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

Re: Meaning of sysread()

Thread Previous | Thread Next
Kurt Starsinic
May 24, 2003 17:11
Re: Meaning of sysread()
Message ID:
On May 24, Ton Hospel wrote:
> Why would sysread ever need anything but byte semantics ?
> For a normal read there's already perl read() itself, which
> can do all cooked semantics one wants. sysread's only reason
> of existence is raw reads.
> I'd vote to just document it to be always raw bytes.
> Or if you must for backward compatibility on windows,
> (though personally i'd consider \r\n games on sysread
> a windows bug), at least define sysread on a
> binmode handle to be *ALWAYS* byte semantics.

    Just once more, I'd like to assert that sysread() should do
whatever C's read() does, however weird or broken that may or may
not be on any given platform.  Its only usefulness that I can see
is to "do a read that works the same as in my C program".

    - Kurt

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