Re: PATCH - raise max_anon limit
From: Jamie Lokier
Date: Thu Feb 12 2004 - 21:03:26 EST
Tim Hockin wrote:
> > The rational for avoiding immediate reuse of id values is to catch
> > application errors. Consider:
> >
> > fd1 = open_like_call(...);
> > read(fd1,...);
> > close(fd1);
> > fd2 = open_like_call(...);
> > write(fd1...);
> >
> > If fd2 has a different value than the recently closed fd1, the
> > error is detected immediately.
>
> Is that really worth working around in such a gross way? No offense to the
> idea, but that's a pretty dumb bug to be hacking a failsafe for :)
I'm pretty sure POSIX requires fd2 to be equal to fd1 if it is the
lowest free file descriptor number.
Unfortunately. An O(1) fd allocation algorithm would be nice.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/