Front page | perl.perl5.porters |
Postings from May 2003
Re: Meaning of sysread()
Thread Previous
|
Thread Next
From:
Nick Ing-Simmons
Date:
May 22, 2003 00:31
Subject:
Re: Meaning of sysread()
Message ID:
20030522073039.1740.3@bactrian.elixent.com
Nick Ing-Simmons <nick.ing-simmons@elixent.com> writes:
>I am begining to wonder if the sysxxx() things should call something
>like:
>
>PerlIO *sys = PerlIO_syslayer(PerlIO *top);
>
>And then
> sysread() calls PerlIO_read(sys,...)
> syswrite() calls PerlIO_write(sys,...)
>
>etc.
>
>Then UNIX'es PerlIO_syslayer would return :unix layer and sysread() would
>call read(2) via the table. Win32's PerlIO_syslayer could return :crlf
>layer.
I tried that last night. It isn't that simple (is it ever?).
That does not work right because when perl's sysread() ends up
calling PerlIOUnix_read(), that isn't a raw read(2) either.
In particular PerlIOUnix_read() restarts on EINTR and sysread() isn't
supposed to. (The socketpair test found this by hanging.)
Apart from there were two other fails:
warnings.t failed to get one warning it was expecting (mystery).
lib/open.t failed the test that sysread() handles chars on :utf8 (expected!)
--
Nick Ing-Simmons
http://www.ni-s.u-net.com/
Thread Previous
|
Thread Next