Subject: Re: wrap up of pipe(2)
To: Greg A. Woods <firstname.lastname@example.org>
From: Andrew Brown <email@example.com>
Date: 10/16/2001 13:53:28
>> A more pressing problem in my opinion is that some ioctls return int,
>> when they should be returning off_t, or perhaps size_t. Look at FIONREAD,
>> for example. If used on a vnode and a system with 32 bit ints, it will
>> simply truncate the file size.
>Maybe it should do what read(2) and readv(2) do and return with EINVAL
>set when the value to be returned is larger than INT_MAX?
read(2) and write(2) don't do that...what they do is return EINVAL if
asked to read or write more than SSIZE_MAX. they don't check the
value to be returned.
if they actually did the read or write and *then* failed because there
was too much data, that would be disastrous.
|-----< "CODE WARRIOR" >-----|
firstname.lastname@example.org * "ah! i see you have the internet
email@example.com (Andrew Brown) that goes *ping*!"
firstname.lastname@example.org * "information is power -- share the wealth."