[patch] don't use SOCK_CLOEXEC if not available
mzqohf at 0pointer.de
Fri Aug 6 12:28:48 PDT 2010
On Fri, 06.08.10 14:26, Colin Walters (walters at verbum.org) wrote:
> On Fri, Aug 6, 2010 at 1:30 PM, Robert Schwebel
> <r.schwebel at pengutronix.de> wrote:
> > +/* only available on linux >= 2.6.27 */
> > +#ifndef SOCK_CLOEXEC
> > +#define SOCK_CLOEXEC 0
> > +#endif
> This patch should probably be defensive and also call fcntl(fd,
> CLOEXEC) too. It doesn't matter for dbus because it's not
> multi-threaded, but for other consumers of sd-daemon.c it may.
I'll fix this upstream and then update the version in D-Bus.
Given that systemd does not support old systems which lack SOCK_CLOEXEC
anyway the suggested patch should actually be fine, since there would
never be any fds we could even set the cloexec flag for...
Lennart Poettering - Red Hat, Inc.
More information about the dbus