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

Re: Processed: Bug#679198: bash: [on native FreeBSD] unable to set FD_CLOEXEC flag



2012/6/29 Steven Chamberlain <steven@pyro.eu.org>:
> #679198 is this bug.  Did you mean #635192?

Yes, sorry.

> In /usr/include/i386-kfreebsd-gnu/bits/fcntl.h :
>
>> #if _POSIX_C_SOURCE >= 200809L
>> #define O_TTY_INIT      0x00080000      /* Restore default termios attributes */
>> /* Defining O_CLOEXEC would break kfreebsd 8.1, see #635192 */
>> /* #define O_CLOEXEC    0x00100000 */
>> #endif
>
> So it is undefined on purpose?

Correct.  Although leaving it undefined might be worse than defining
it.  E.g. consider programs doing:

/* use O_CLOEXEC if possible */
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif

fd = open (..., O_CLOEXEC);
// don't bother closing fd

But the decision is up to glibc maintainers.

-- 
Robert Millan


Reply to: