SUMMARY - trap on input to a file

From: Stuart Whitby (
Date: Thu Aug 10 2000 - 05:20:55 CDT

Thanks to:

Thomas Knox
Craig McLean
Sanjiv K. Bhatia
Denise Naomi Ishikawa
Bruce R. Zimmer
Ravi Channavajhala

for their answers. Ideas included using fstat() in C to continually
check the file, sending output to stderr (no can do - it's built
into the binary and I'd still need to set a constant watch),
modifying the program that's generating the message (no can do -
don't have access to them). But the winners, for us scripting guys,

swatch, which is freely available and already set up to do this
stuff, and changing the output file to a named pipe (mknod <file> p).
Using the named pipe is the method I've gone for, mostly because I
received that response first (it also saves me time learning how to
configure swatch - another bonus). I can now read from that pipe and
act on the input as it is received.


Stuart Whitby.

U BEFORE POSTING please READ the FAQ located at
. and the list POLICY statement located at
A To submit questions/summaries to this list send your email message to:
A To unsubscribe from this list please send an email message to:
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:14 CDT