bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: O_CLOEXEC support


From: James Youngman
Subject: Re: O_CLOEXEC support
Date: Sun, 30 Aug 2009 12:56:03 +0100

On Fri, Aug 21, 2009 at 12:42 AM, Eric Blake<address@hidden> wrote:
> Interesting.  What happens if you pass the bit value of O_CLOEXEC to an
> older kernel that doesn't understand it - does the open fail with ENOSYS,
> or does it cause a kernel panic (requiring a reboot for recovery)?

I haven't tested this particular case, but I did test the analogous
situation with O_NOFOLLOW.  The sad answer is that the unknown flag is
silently ignored.

I worked around this issue in findutils by
http://git.savannah.gnu.org/cgit/findutils.git/commit/?id=2d428f84bd80ecf768446f6d9e717bcc5dc719db

Essentially, check uname() to see if we think the kernel supports it.
  Later I also had to add a check for O_NOFOLLOW==0.

James.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]