Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bi-Directional interprocess comms on Unix

Status
Not open for further replies.

Loon

Programmer
May 24, 2000
100
GB
Morning,<br>&nbsp;&nbsp;&nbsp;&nbsp;I am trying to learn a thing or two about using Open2/3 and Select and Sysread etc.. to get two process to talk to each other. One is a perl program the other a unix command line utility. I can get STDIN, STDOUT and STDERR to show up in my Perl proggy.. but I keep getting a deadlock situation.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;The various books I have are of little help, they say things like &quot;deadlock can occur&quot; and then give no reasons as to why... <br><br>&nbsp;&nbsp;&nbsp;&nbsp;Could anyone who knows what I am talking about post the address of a good tutorial or a segment of code using the above functions?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Your's in grateful anticipation<br>&nbsp;&nbsp;&nbsp;&nbsp;Loon<br><br><br>
 
Loon,<br><br>I've always done this kind of thing using two named pipes; each process listening on one of the pipes and replying on the other.<br><br>This is because I'm a coward &lt;smile&gt;. All of the references to open2 etc I've come across talk about deadlocks and give no clue how to continue -- so I do things the easy way. <p>Mike<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>Please don't send me email questions without posting them in Tek-Tips as well. Better yet -- Post the question in Tek-Tips and send me a note saying "Have a look at so-and-so in the thingy forum would you?"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top