[Vm-dev] Stdin/stdout/stderr support

Bert Freudenberg bert at freudenbergs.de
Fri Aug 29 19:45:46 UTC 2008


Am 29.08.2008 um 20:15 schrieb Igor Stasenko:

>
> 2008/8/29 Bert Freudenberg <bert at freudenbergs.de>:
>>
>> I have implemented direct support for std streams:
>>
>> http://squeakvm.org/svn/squeak/branches/olpc/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c
>>
>> This will catch filenames like "/dev/stderr" and connect the real  
>> stderr
>> instead (also preventing to close these).
>>
>> This file pattern is in usage already, e.g.
>>
>> http://lists.squeakfoundation.org/pipermail/beginners/2007-April/002268.html
>>
>> In OLPC we used this to log errors (we added FileStream  
>> class>>stderr etc.)
>> because SqueakDebug.log is in an unaccessible place, but using the
>> /dev/stderr symlink is broken by the security architecture, so I  
>> need to
>> access the actual stderr.
>>
>> Any objections to make this go into the trunk Cross platform dir?
>>
>
> yes. In windows you can't open '/dev/stderr'

That file is not used on Windows.

> but you can open it if you using an stdio library. like fopen(...)
>
> In libc they are defined as a 'well-known' file handles = 0,1,2 which
> is stand for stdin, stdout and stderr correspondingly.
>
> And i'm completely with you. Squeak should have support for standard
> input/output streams.
>
>> - Bert -
>>
>>
>>
>
> -- 
> Best regards,
> Igor Stasenko AKA sig.

- Bert -




More information about the Vm-dev mailing list