signals to running processes

Leslie Mikesell les at chinet.chi.il.us
Fri Dec 2 04:50:33 AEST 1988


In article <950 at taux01.UUCP> cjosta at taux01.UUCP (Jonathan Sweedler) writes:

>2) Or, is there another way for a random user to cause a program to
>asynchronously print out a status report (or perform some action) once
>it has started running?

If you are running SysV you can have the program fork off a process
that creates a FIFO with appropriate write permissions and blocks
waiting for someone to write a command to it.  When it reads a command
it would send a signal to its parent.  You might also set up a
pipe from the child to the parent so that the details of the command
could be passed (such as the device or another FIFO name to send the
progress report to).  If response doesn't have to be instant, the main
process could periodically do a non-blocking read on the FIFO instead
of using a child process.  I suppose that something similar is possible
with sockets under BSD.

Les Mikesell



More information about the Comp.unix.questions mailing list