Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!usc!apple!uokmax!d.cs.okstate.edu!drd!mark From: mark@DRD.Com (Mark Lawrence) Newsgroups: comp.lang.perl Subject: Re: pipe to sort and back Message-ID: <1990Aug29.135758.413@DRD.Com> Date: 29 Aug 90 13:57:58 GMT References: <3702@ruuinf.cs.ruu.nl> <3284@uniol.UUCP> <3710@ruuinf.cs.ruu.nl> Organization: DRD Corporation Lines: 15 } In article <3284@uniol.UUCP> henseler@uniol.UUCP (Herwig Henseler) writes: } > [ quotes original problem, my solution, and detects deadlock ] henkp@ruuinf.cs.ruu.nl (Henk P. Penning) wrote: } The problem is that this solution is inadequate in the situation where } the data that the main-prog sends to the sub-prog depends (also) on what } the sub-prog sends back. } I think there is no general solution to the deadlock problem. } To avoid it, you always have to be carefull with your buffering and flushing. But it is alright in this particular situation. As Herwig pointed out, I'm depending on sort's behaviour, i.e. buffering all input before spewing output. -- mark@DRD.Com uunet!apctrc!drd!mark$B!J%^!<%/!!!&%m!<%l%s%9!K(B