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 #83716 is a reply to message #83700] Wed, 27 March 2013 06:27 Go to previous messageGo to previous message
bstecklu is currently offline  bstecklu
Messages: 14
Registered: February 2012
Junior Member
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?
>
> 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)

May be I am missing your point but

IDL> WRITEU, unit, 'foo' & SPAWN, 'md5sum foo', checksum

will give you the result in the string (array) checksum.

Bringfried
[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: Sat Nov 29 11:06:45 PST 2025

Total time taken to generate the page: 0.16284 seconds