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

Re: Meaning of sysread()

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
May 21, 2003 07:46
Subject:
Re: Meaning of sysread()
Message ID:
20030521144539.2695.1@bactrian.elixent.com
Mark Mielke <mark@mark.mielke.cc> 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
http://www.ni-s.u-net.com/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About