Re: [PATCH] Add cloexec information to fdinfo

Ulrich Drepper
2011-06-30T13:40:32Z

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

On 06/29/2011 10:59 PM, Ulrich Drepper wrote:
> It provides the information, yes, but it also hides some information.
> If you do it this way we cannot distinguish code which uses O_CLOEXEC at
> open-time from uses of fcntl(FD_CLOEXEC).

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.

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.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]