develooper Front page | perl.perl5.porters | Postings from May 2003

Re: Meaning of sysread()

Thread Previous | Thread Next
Nick Ing-Simmons
May 21, 2003 07:46
Re: Meaning of sysread()
Message ID:
Mark Mielke <> writes:
>I expect Perl sysread() to call C read() without any buffering, which
>therefore means the level at which the system call returns
>units. Specifically I don't want select() to ever block where
>sysread() would return data.

That way round is reasonably likely to work.
What the characters semantic might cause is the converse: select()
says it is readable but sysread() blocks. For example we only have 
the (part-of?) escape-sequence that says "following characters are ASCII" 
but no characters yet - and we don't want to return 0 because that means EOF 
and it isn't.

Devious work-rounds like failing with EAGAIN might work round this...

Nick Ing-Simmons

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About