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

Home » Public Forums » archive » 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 
Switch to threaded view of this topic Create a new topic Submit Reply
Can one close only one of STDIN and STDOUT when using SPAWN with the UNIT keyword? [message #83721] Tue, 26 March 2013 15:30
tom.grydeland is currently offline  tom.grydeland
Messages: 51
Registered: September 2012
Member
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?

For example, if the external command is a checksum program, like 'md5sum':

IDL> SPAWN, 'md5sum', UNIT=unit
IDL> WRITEU, unit, 'foo'
IDL> {close unit in the input-to-md5sum direction}
IDL> READU, unit, checksum
IDL> {proceed with checksum}

Can the above be done from IDL? How?

--T (tom.grydeland@norut.no)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Using "the IDL way" and it's still not fast enough
Next Topic: Inscribed circle

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

Current Time: Wed Oct 08 15:07:43 PDT 2025

Total time taken to generate the page: 0.00530 seconds