This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [v2] Remove __ASSUME_O_CLOEXEC / O_CLOEXEC conditionals in sysdeps/unix/sysv/linux/
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 25 Jun 2014 11:46:08 -0700 (PDT)
- Subject: Re: [v2] 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 1406251821230 dot 12113 at digraph dot polyomino dot org dot uk>
Currently I'm inclined against requiring O_CLOEXEC for all configurations.
> @@ -164,9 +157,7 @@ shm_open (const char *name, int oflag, mode_t mode)
> __mempcpy (__mempcpy (fname, mountpoint.dir, mountpoint.dirlen),
> name, namelen + 1);
>
> -#ifdef O_CLOEXEC
> oflag |= O_CLOEXEC;
> -#endif
Just move | O_CLOEXEC into the open call along with | O_NOFOLLOW.
Otherwise looks fine.
Thanks,
Roland