From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28984 invoked from network); 23 Jun 1997 21:08:19 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 23 Jun 1997 21:08:19 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id RAA14439; Mon, 23 Jun 1997 17:00:06 -0400 (EDT) Resent-Date: Mon, 23 Jun 1997 17:00:06 -0400 (EDT) From: Zefram Message-Id: <20546.199706232103@stone.dcs.warwick.ac.uk> Subject: Re: process watching? To: jf@ugcs.caltech.edu (Joe Fouche) Date: Mon, 23 Jun 1997 22:03:49 +0100 (BST) Cc: zsh-workers@math.gatech.edu In-Reply-To: <19970622151255.11609@helix.caltech.edu> from "Joe Fouche" at Jun 22, 97 03:12:55 pm X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]9529.38 X-Phase: The Moon is Waning Gibbous (88% of Full) X-US-Congress: Moronic fuckers X-Personality: INTJ X-This-is-not-HTML: Content-Type: text Resent-Message-ID: <"yM6zW1.0.YX3.MFkhp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3291 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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