Re: [PATCH] Add cloexec information to fdinfo

Linus Torvalds
2011-06-30T16:07:53Z

On Thu, Jun 30, 2011 at 6:39 AM, Ulrich Drepper <drepper@akkadia.org> wrote:
>
> One more reason to at least not use the patch as you have it right now.
>  If a file descriptor was opened with O_CLOEXEC but subsequently the bit
> has been reset using fcntl() the f_flags value would still have the
> O_CLOEXEC bit set.

Umm. Look at my patch again. It masks the O_CLOEXEC bit *exactly*
because the bit is useless as it is now.

Which is why your previous objection was so silly too and I didn't
even bother replying to the blather. O_CLOEXEC at open time has no
special magical meaning. The only meaningful value for that bit is the
current one.

Which is exactly what my patch did.

> If you don't like the separate cloexec line, at least reset the
> O_CLOEXEC bit in the f_flags output if the FD_ISSET() test returns zero.

How about you just read the patch again?

This issue is closed as far as I am concerned. I repeat from my previous email:

"I'm not going to commit it, but if others think this is a reasonable
thing to do and remind me during the next merge window, we can
do it then."

Gaah.

Linus