bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wait4 - proposed new program


From: Martin von Gagern
Subject: wait4 - proposed new program
Date: Thu, 07 Aug 2003 22:20:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030805

Hello!

I'm proposing a little program, let's call it "wait4", maybe to one day
become part of the coreutils.

Basically that thing should monitor files listed as arguments and
terminate successfully as soon as one is changed.
For example:
 while wait4 program.c *.h; do make program && ./program; done
So I could edit the code in my favorite editor, and as soon as I save my
changes, the thing is recompiled.

I've written a first version of this for myself, simply polling for the
filenames every second and comparing the mtime. Given some time, I'd
like to do some additions listed below.

I believe this tool to be useful enough to be made available to the
public, but too small to be a standalone package. So I thought perhaps
it should be part of coreutils. What do you think?

BTW: Do you know anything like this around? I found nothing, but because
this could be phrased in so many different ways and could always be part
of a larger package, that accounts for nothing.

Additions I have in mind:
- handling of standard options (--help, --version)
- configurable polling interval
- configurable handling of files being / becoming nonexistent
- successful termination on input on stdin (manual trigger)
- selection of which stat fields are being watched
- integration of FAM API where available

The last could be a problem for the order in which the utilities are
built from source, as building FAM might require the existence of the
coreutils, so wait4 would have to be compiled twice.
Is this reason enough not to make it a part of coreutils?

See also http://oss.sgi.com/projects/fam/

I would appreciate your opinions.
Thanx,
 Martin

Attachment: pgpG0xPTadq5U.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]