On Thu, Feb 02, 2012 at 10:29:00PM -0700, Philip Guenther wrote:
> On Thu, 2 Feb 2012, Philip Guenther wrote:
> > I also think readdir() should set errno if it detects an invalid
> > seekdir(). EINVAL seems correct.
>
> Here's a diff for this bit.
>
> oks?
>
>
> Philip Guenther
>
>
> Index:
On 3 February 2012 03:29, Philip Guenther wrote:
> On Thu, 2 Feb 2012, Philip Guenther wrote:
>> I also think readdir() should set errno if it detects an invalid
>> seekdir(). EINVAL seems correct.
>
> Here's a diff for this bit.
>
> oks?
>
>
> Philip Guenther
>
>
> Index: gen/readdir.c
> ===
On 3 February 2012 02:50, Philip Guenther wrote:
> On Thu, Feb 2, 2012 at 5:29 AM, Christiano F. Haesbaert
> wrote:
>> On 2 February 2012 10:13, Laurence Tratt wrote:
>>> To my surprise (and a couple of hours debugging later), readdir does not
>>> necessarily set errno even if NULL is returned.
On Thu, Feb 02, 2012 at 09:50:45PM -0700, Philip Guenther wrote:
>>> The current man page doesn't claim that errno is always set but one might
>>> reasonably assume that it is: certainly, it seems a horribly easy way of
>>> introducing bugs (at least for idiots such as myself).
[...]
[Christiano]
On Thu, 2 Feb 2012, Philip Guenther wrote:
> I also think readdir() should set errno if it detects an invalid
> seekdir(). EINVAL seems correct.
Here's a diff for this bit.
oks?
Philip Guenther
Index: gen/readdir.c
===
RCS file:
On Thu, Feb 2, 2012 at 5:29 AM, Christiano F. Haesbaert
wrote:
> On 2 February 2012 10:13, Laurence Tratt wrote:
>> To my surprise (and a couple of hours debugging later), readdir does not
>> necessarily set errno even if NULL is returned. This is rather confusing
>> because if NULL is returned t
On 2 February 2012 10:13, Laurence Tratt wrote:
> To my surprise (and a couple of hours debugging later), readdir does not
> necessarily set errno even if NULL is returned. This is rather confusing
> because if NULL is returned two things might have happened:
>
> 1) The end of the directory has b
To my surprise (and a couple of hours debugging later), readdir does not
necessarily set errno even if NULL is returned. This is rather confusing
because if NULL is returned two things might have happened:
1) The end of the directory has been reached in a normal fashion; errno
won't have be