[Pharo-dev] simulator spotted a small problem with initializing stdout for the CommandLineHandler

Pharo4Stef pharo4Stef at free.fr
Wed Apr 2 02:02:54 EDT 2014


Tx

https://pharo.fogbugz.com/default.asp?13165


On 01 Apr 2014, at 19:48, Eliot Miranda <eliot.miranda at gmail.com> wrote:

> Hi Camillo,
> 
>     Clément and I are simulating Pharo for Sista and I've spotted the following small problem with the BasicCommandLineHandler's use of stdout.  It looks like a bug in MultiByteFileStream>wantsLineEndConversion:.  BasicCommandLineHandler>>initializeStdout sets stdout's line end conventuion, but in doing so MultiByteFileStream>wantsLineEndConversion: sends MultiByteFileStream>detectLineEndConvention, which is wrong, because stdout is write-only.  I needed to change the simulator to fail as the VM does, but perhaps a better fix is not to try and read from write-only streams.  Anyway, thought I'd point it out.  No biggie.
> 
>   16r101B18 M MultiByteFileStream>detectLineEndConvention 16r1F3A7A0: a(n) MultiByteFileStream
>   16r101B38 I MultiByteFileStream>wantsLineEndConversion: 16r1F3A7A0: a(n) MultiByteFileStream
>   16r101B60 I BasicCommandLineHandler(CommandLineHandler)>initializeStdout 16r1F3A654: a(n) BasicCommandLineHandler
>   16r101B84 I BasicCommandLineHandler(CommandLineHandler)>initialize 16r1F3A654: a(n) BasicCommandLineHandler
>   16r101BA4 I BasicCommandLineHandler>initialize 16r1F3A654: a(n) BasicCommandLineHandler
>   16r101BBC M BasicCommandLineHandler class(Behavior)>new 16r5B04CC: a(n) BasicCommandLineHandler class
>   16r101BD4 M [] in BasicCommandLineHandler class>startUp: 16r5B04CC: a(n) BasicCommandLineHandler class
> 
> -- 
> best,
> Eliot





More information about the Pharo-dev mailing list