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

RE: waiting for other process..



On 21-Oct-98 Ze'ev Maor wrote:
> How can I wait under sh (not wait() ) for a process that isn't in the
> context of the shell that called the wait ??
Only parent process can wait/waitpid/wait3/wait4() for a child
process (even if you use C without the sh(1) limitations).
However, if you only want to coordinate some activity between
two processes you can use:
        1. signals (usually bad idea, but accessible from sh(1)
           via kill/trap..
        2. Some other IPC like named-pipes which are accessible
           from sh(1). You can write some info in the one end
           and block on reading the other end.

----------------------------------------------------------------
Oron Peled                             Voice/Fax: +972-4-8228492
oron@actcom.co.il                  http://www.actcom.co.il/~oron

In a world without fences - who needs GATES ?