Hi Folks.

Continuing with my previous failed efforts to get the output stream from a linux process into squeak, I studied the UnixProcess testPipeLine.

I have modified it under my own test method, as shown below
catFromFileToSqueak


| input pipe2  output dest child desc result|
input := OSProcess readOnlyFileNamed: '/home/wm/install.txt'.  "returns a MultiByteFileStream: '/etc/hosts'"
pipe2 := OSPipe nonBlockingPipe.
output := pipe2 writer.
dest := pipe2 reader.
desc := Array
with: input
with: output
with: nil.

child := UnixProcess
forkJob: '/bin/cat'
arguments: nil
environment: nil
descriptors: desc.
input close.
output close.
result := dest upToEnd.
result inspect.
self break.
dest close.
child sigterm.
^ result

Here is the oddity...



UnixProcess catFromFileToSqueak

when I invoke the method by "inspecting it" via CTL-I I get an empty string returned, or just a Do-It and hit the break, the result inspect is an empty string.
BUT! When I inspect dest , then in its workbox, type self upToEnd (inspect it) I get the contents.


The overarching purpose of my efforts is to be able to stream the unix output of tar, bzcat, unzip...etc directly into squeak using the OSProcess tools. directly into the monty (?) SAX / XML tools...(excellent tools, btw, thank you for your work.
ios := (StandardFileStream readOnlyFileNamed:(path,filename)).  <--HERE I want to replace the StandardFileStream with something from OSProcess.
ios inspect.
[(WikiMediaSaxToPostrgresHandler on: ios) debug:true;  pingevery:100000;  optimizeForLargeDocuments;parseDocument.] forkAt: Processor userBackgroundPriority named:'SaxToDB'

cordially and thanks in advance