'From etoys3.0 of 7 March 2008 [latest update: #2113] on 29 August 2008 at 1:11:46 pm'! "Change Set: robustStdStreams-bf Date: 28 August 2008 Author: Bert Freudenberg Protect stdin, stdout, stderr against file open failure."! !FileStream class methodsFor: 'standard streams' stamp: 'bf 8/28/2008 16:59'! stderr SmalltalkImage current platformName = 'unix' ifFalse: [^nil]. ^StdErr ifNil: [ StdErr := MultiByteFileStream new open: '/dev/stderr' forWrite: true. StdErr ifNotNil: [StdErr lineEndConvention: #lf]. StdErr]! ! !FileStream class methodsFor: 'standard streams' stamp: 'bf 8/28/2008 17:00'! stdin SmalltalkImage current platformName = 'unix' ifFalse: [^nil]. ^StdIn ifNil: [ StdIn := MultiByteFileStream new open: '/dev/stdin' forWrite: false. StdIn ifNotNil: [StdIn lineEndConvention: #lf]. StdIn]! ! !FileStream class methodsFor: 'standard streams' stamp: 'bf 8/28/2008 17:00'! stdout SmalltalkImage current platformName = 'unix' ifFalse: [^nil]. ^StdOut ifNil: [ StdOut := MultiByteFileStream new open: '/dev/stdout' forWrite: true. StdOut ifNotNil: [StdOut lineEndConvention: #lf]. StdOut]! !