comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Can one close only one of STDIN and STDOUT when using SPAWN with the UNIT keyword?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Can one close only one of STDIN and STDOUT when using SPAWN with the UNIT keyword? [message #83700] Wed, 27 March 2013 12:02 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, March 26, 2013 6:30:04 PM UTC-4, Tom Grydeland wrote:
> Hi all,
>
> Some commands only produce output after all of the input has been consumed. For such a command, the usual approach when given input and output streams is to open both, feed the process all its input, close the input stream and then read the result on the output stream.
>
> In IDL, when using SPAWN with the UNIT keyword, one file unit is supposed to be used for both directions. Is it possible to do the above from IDL?

This is the standard race condition that exists for bidirectional pipes. I don't think you can work around it with IDL. You might be better off redirecting the output of your program to a file, and then reading the file when the SPAWN'd process is complete.

Craig
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Calculating difference between each element in array from previous
Next Topic: A Healthy Alternative to Takeaway Regret

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 17 09:55:24 PDT 2025

Total time taken to generate the page: 1.12077 seconds