[squeak-dev] Is there any way of reopening OSProcess thisOSProcess
stdOut to a given FileStream?
Casimiro de Almeida Barreto
casimiro.barreto at gmail.com
Mon May 18 14:35:56 UTC 2009
OSProcess thisOSProcess stdOut nextPutAll: 'This is a test'. will print
"This is a test" in the shell that started squeak.
OSProcess thisOSProcess stdOut close. successfully closes stdOut.
Under linux, if I open a new file after closing stdout it will have the
FD #1 (given stdin is not closed too) and I would successfully have
redirected stdOut to that file. But in squeak if I do something like:
fd := FileStream fileNamed: 'aGenericPipeline'.
OSProcess thisOSProcess setStdOut.
OSProcess thisOSProcess stdOut nextPutAll: 'This is a test',Character lf
Things get weird... (to the point that squeak VM crashes).
I also tried to do:
squeak > fifo
But squeak just won't start...
Any suggestions on how reopen stdOut to a desired point other than the
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090518/2da3abb9/signature.pgp
More information about the Squeak-dev