This is the mail archive of the
mailing list for the glibc project.
Re: Remove __ASSUME_O_CLOEXEC / O_CLOEXEC conditionals in sysdeps/unix/sysv/linux/
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 25 Jun 2014 13:00:39 +0000
- Subject: Re: Remove __ASSUME_O_CLOEXEC / O_CLOEXEC conditionals in sysdeps/unix/sysv/linux/
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1406201639240 dot 16806 at digraph dot polyomino dot org dot uk> <mvmzjh188ez dot fsf at hawking dot suse dot de>
On Wed, 25 Jun 2014, Andreas Schwab wrote:
> "Joseph S. Myers" <email@example.com> writes:
> > diff --git a/sysdeps/unix/sysv/linux/dl-opendir.c b/sysdeps/unix/sysv/linux/dl-opendir.c
> > index 72d2c06..c1cdc05 100644
> > --- a/sysdeps/unix/sysv/linux/dl-opendir.c
> > +++ b/sysdeps/unix/sysv/linux/dl-opendir.c
> > @@ -1,6 +1 @@
> > -/* In this implementation we do not really care whether the opened
> > - file descriptor has the CLOEXEC bit set. The only call happens
> > - long before there is a call to fork or exec. */
> > -#undef __ASSUME_O_CLOEXEC
> > -#define __ASSUME_O_CLOEXEC 1
> > #include <opendir.c>
> That file is no longer needed.
Followup cleanups in that regard for both this and the __ASSUME_ATFCTS
patch are welcome. This patch is deliberately conservative to make sure
that it doesn't change the disassembly of installed shared libraries at
all (not even e.g. through reordering of the objects linked into them).
Comments are also welcome on the question of whether - again as a followup
- we should make O_CLOEXEC a required feature for glibc and so remove all
conditionals on __ASSUME_O_CLOEXEC throughout the source tree.
Joseph S. Myers