Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!yale!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.unix.wizards Subject: Re: Taking Control of stdin/stdout of a slave process Message-ID: <15509@smoke.brl.mil> Date: 19 Mar 91 01:51:46 GMT References: <1991Mar14.140749.24337@cm.cf.ac.uk> <15500@smoke.brl.mil> <5404:Mar1805:47:4991@kramden.acf.nyu.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 10 In article <5404:Mar1805:47:4991@kramden.acf.nyu.edu> brnstnd@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.