Taking Control of stdin/stdout of a slave process

Doug Gwyn gwyn at smoke.brl.mil
Tue Mar 19 11:51:46 AEST 1991


In article <5404:Mar1805:47:4991 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
>A carefully designed protocol can ensure that deadlock will not occur,
>but if you don't have control over the slave then the master can still
>eliminate the chance of deadlock all by itself.

Not necessarily; it all depends on what use the master is trying to make
of the slave.  For example, if the master sends some command to the slave
then listens for a response, and if the slave happens to have put the
response into its stdout buffer but hasn't fflush()ed it out, the master
simply cannot proceed, and nothing it can do will make the slave cooperate.



More information about the Comp.unix.wizards mailing list