in reply to Re: syswrite and STDOUT
in thread syswrite and STDOUT

Win32 was mentioned in the CB. I suspect that reporting $^E instead of just $! might be more instructive. But it isn't just the buffer size of the pipe (which defines how much can be sent atomically); I'm assuming that the amount of data is so much that the kernel exhausted some resource trying to buffer it all. I find it surprising that this would happen (and I doubt it would on Unix), but that was the best guess I could come up with.

- tye        

Replies are listed 'Best First'.
Re^3: syswrite and STDOUT (guess)
by polettix (Vicar) on Apr 29, 2005 at 15:41 UTC
    But it isn't just the buffer size of the pipe (which defines how much can be sent atomically); I'm assuming that the amount of data is so much that the kernel exhausted some resource trying to buffer it all.
    You're right, I merged the concepts, even if some lurking inside the 2.4.x Linux kernel convinced me that Linux considers them to be the same, as far as I can remember.

    Anyway, the fractioned approach you suggest should be used more generally - testing if write/syswrite actually wrote all requested characters should become an habit much like testing if open was successful.

    Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

    Don't fool yourself.