[Top][All Lists]
[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.
- Re: O_CLOEXEC support, (continued)
- Re: O_CLOEXEC support, Eric Blake, 2009/08/20
- Re: O_CLOEXEC support, Paolo Bonzini, 2009/08/21
- Re: O_CLOEXEC support, Paolo Bonzini, 2009/08/21
- Re: O_CLOEXEC support, Eric Blake, 2009/08/21
- [PATCH] popen-safer: test O_CLOEXEC at run-time., Paolo Bonzini, 2009/08/21
- Re: [PATCH] popen-safer: test O_CLOEXEC at run-time., Eric Blake, 2009/08/21
- Re: [PATCH] popen-safer: test O_CLOEXEC at run-time., Paolo Bonzini, 2009/08/21
- Re: O_CLOEXEC support,
James Youngman <=
- fcntl module (was: O_CLOEXEC support), Eric Blake, 2009/08/21
- Re: fcntl module, Paolo Bonzini, 2009/08/22
- Re: fcntl module (was: O_CLOEXEC support), Bruno Haible, 2009/08/22
- Re: fcntl module, Paolo Bonzini, 2009/08/22
- Re: fcntl module, Bruno Haible, 2009/08/22
- Re: fcntl module, Paolo Bonzini, 2009/08/23
- Re: fcntl module, Eric Blake, 2009/08/22
- Re: fcntl module, Bruno Haible, 2009/08/22
- Re: fcntl module, Eric Blake, 2009/08/22
- Re: fcntl module, Bruno Haible, 2009/08/23