Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: TRAPNAL with TMOUT problem
- X-seq: zsh-users 3386
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Paul Lew <paullew@xxxxxxxxx>, zsh-users@xxxxxxxxxxxxxx
- Subject: Re: TRAPNAL with TMOUT problem
- Date: Mon, 21 Aug 2000 10:48:08 -0700
- In-reply-to: <14752.50467.89781.100331@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <14752.50467.89781.100331@xxxxxxxxxxxxxxxxxxxxxxx>
On Aug 20, 10:58pm, Paul Lew wrote:
> Subject: TRAPNAL with TMOUT problem
>
> The 'idle' time for command 'w' is now affected by the invocation of
> TRAPALRM function, i.e., if I defined TMOUT to be 3600, zsh will never
> show idle more than 60 minutes.
The "idle" time is nothing more than the difference between the access
time and the modification time of the tty device file for the associated
terminal. I have a TMOUT/TRAPALRM that updates the title bar of my xterm
every 60 seconds, yet my w output still shows me as having been idle all
weekend on terminals I haven't touched yet this morning.
Probably what's happening is that the terminal is getting "accessed" when
the background job runs. (My traps use only builtins, so no new job group
needs to become associated with the terminal.)
Try starting the background jobs with stdin/out/err all redirected and a
trailing &! token to "disown" them. I'm not certain that wll prevent zsh
from associating the job with the terminal, but it's easy to test.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author