Front page | perl.perl5.porters |
Postings from May 2003
Re: Meaning of sysread()
Thread Previous
|
Thread Next
From:
Nicholas Clark
Date:
May 21, 2003 11:00
Subject:
Re: Meaning of sysread()
Message ID:
20030521185912.K1149@plum.flirble.org
On Wed, May 21, 2003 at 05:54:17PM +0100, Nick Ing-Simmons wrote:
> Mark Mielke <mark@mark.mielke.cc> writes:
> >
> >Here is another argument:
> >
> >sysread() is documented ('man perlfunc') to '[attempt] to read LENGTH
> >characters of data ... [bypassing] buffered IO ...'. If Perl sysread()
> >is actually implemented using C read(), then it would be impossible to
> >read LENGTH characters of data, and only LENGTH characters of data
> >without calling C read() once for each byte. Remember - no buffering.
>
> You read LENGTH bytes and see how many characters that is.
> You find it is LENGTH-N chars so you read N more bytes and see where
> you are ...
I always assumed (note, assumed, not RTFM, read the Camel Book or read
the source) that sysread and syswrite make precisely 1 system call per
perl level call.
Or would this be where I need POSIX::read (etc)?
Nicholas Clark
Thread Previous
|
Thread Next