Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: process watching?
- X-seq: zsh-workers 3291
- From: Zefram <zefram@xxxxxxxxxxxxxxxxx>
- To: jf@xxxxxxxxxxxxxxxx (Joe Fouche)
- Subject: Re: process watching?
- Date: Mon, 23 Jun 1997 22:03:49 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <19970622151255.11609@xxxxxxxxxxxxxxxxx> from "Joe Fouche" at Jun 22, 97 03:12:55 pm
Joe Fouche wrote:
>A few times lately, I've had need of a way to watch for a certain process to
>exit. I think it'd be a nice addition to zsh. For example, suppose I want to
>be notified when the process "foo" terminates. I'd like to be able to do
>
>% watch $(pidof foo)
>
>and continue about my business, and later zsh would say something like
>
>foo exited at 8:10AM.
>%
>
>Is this feasible? :)
Very feasible, in much the same way as the current $WATCH system, and I
for one would find it useful. Perhaps you'd like to write it as a module?
All the necessary hooks already exist -- look at the sched module to
see how it runs code before each prompt. (Of course, it could be done
in user code, using $PERIODIC, but that's a rather messy mechanism and
not entirely appropriate.)
(I would implement this tonight, but I'm very busy with real life
right now.)
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author