in reply to syswrite and STDOUT
syswrite() is supposed to return the number of bytes actually written and not chocke if there are too much of them. Also, note that syswrite() could return 0 without implying an error (which is signaled by undef). I believe that Linux write(2) actually works like this.
AFAIK, POSIX requires the minimum buffer size for pipes and stuff like that to be at least 512. Most modern system should support greater buffers, and this is why tye uses 4096 (which I remember to be the default size in Linux). To be on the safest side I'd stick to 512, but you could be on a non-POSIX system and need to adjust your aim :)
Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')
Don't fool yourself.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: syswrite and STDOUT (guess)
by tye (Sage) on Apr 29, 2005 at 15:28 UTC | |
by polettix (Vicar) on Apr 29, 2005 at 15:41 UTC |