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

Bug#635192: provide O_CLOEXEC on kfreebsd-*



I don't understand why this is taking so long.  O_CLOEXEC was defined on
Linux long before all supported kernels had it, and people (used to?)
have fallback code for the case where open(O_CLOEXEC) returned EINVAL,
to do the racy fcntl dance.  I don't see why the kernel running on
buildds matters one bit for whether userland gets the define...

May be they "used to", but currently even eglibc itself does not have such fallback inside. Even inside elf loader, i.e. elf/dl-misc.c:

  int flags = O_RDONLY;
#ifdef O_CLOEXEC
  flags |= O_CLOEXEC;
#endif

The open with unknown flags fails and elf loader
does not try it again without O_CLOEXEC.

As we really want to run testsuite,
the kernel have to support O_CLOEXEC at least for open().

Petr


Reply to: