[squeak-dev] Weird problem with stdOut...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Weird problem with stdOut...

CdAB63
Something weird concerning to stdOut...

If I delete the line in red, a transcript will be open but nothing will be available at the pipeline. Nevertheless, processes will run OK. Obvious, the line will produce an output at the shell where squeak is being run. The final OSProcess thisOSProcess stdOut ... were put only to provide something at the shell...



OSProcess thisOSProcess stdOut nextPutAll: 'Training ANN...'.
        
    child := PipeableOSProcess forkHeadlessSqueakAndDoThenQuit: [
                fInterface apiFannCascadetrain: aFann onData: someTrainingData maxNeurons: aNumberOfNeurons reporting: 1 toPrecision: theMaxError asFloat.
                fInterface apiFannSave: aFann toFile: aFileName ].
    
    ts := TranscriptStream new.
    ts openLabel: 'Training ANN: ',aFileName.
    
    [ child isComplete ] whileFalse: [
        
        | str |
        
        child flush.
        str := child upToEnd.
        str size > 0
            ifTrue: [
                ts show: str.
                ts show: Character cr].
        (Delay forSeconds: 5) wait.
    ].

    ts closeAllViews.
    
    OSProcess thisOSProcess stdOut nextPutAll: ' [DONE]'.
    OSProcess thisOSProcess stdOut nextPut: Character lf.



signature.asc (268 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Weird problem with stdOut...

David T. Lewis
Hi Casimiro,

I have a text-only mail reader, so I cannot see which line is in red.
I am afraid that I don't understand the problem. Is there a problem
with the stdOut from Squeak ("OSProcess thisOSProcess stdOut") or a
problem with the stdOut from the child process ("child upToEnd") ?

Sorry, I am confused.

Dave


On Tue, Sep 01, 2009 at 10:06:39PM -0300, Casimiro de Almeida Barreto wrote:

> Something weird concerning to stdOut...
>
> If I delete the line in red, a transcript will be open but nothing will
> be available at the pipeline. Nevertheless, processes will run OK.
> Obvious, the line will produce an output at the shell where squeak is
> being run. The final OSProcess thisOSProcess stdOut ... were put only to
> provide something at the shell...
>
>
>
> OSProcess thisOSProcess stdOut nextPutAll: 'Training ANN...'.
>        
>     child := PipeableOSProcess forkHeadlessSqueakAndDoThenQuit: [
>                 fInterface apiFannCascadetrain: aFann onData:
> someTrainingData maxNeurons: aNumberOfNeurons reporting: 1 toPrecision:
> theMaxError asFloat.
>                 fInterface apiFannSave: aFann toFile: aFileName ].
>    
>     ts := TranscriptStream new.
>     ts openLabel: 'Training ANN: ',aFileName.
>    
>     [ child isComplete ] whileFalse: [
>        
>         | str |
>        
>         child flush.
>         str := child upToEnd.
>         str size > 0
>             ifTrue: [
>                 ts show: str.
>                 ts show: Character cr].
>         (Delay forSeconds: 5) wait.
>     ].
>
>     ts closeAllViews.
>    
>     OSProcess thisOSProcess stdOut nextPutAll: ' [DONE]'.
>     OSProcess thisOSProcess stdOut nextPut: Character lf.