[patch] don't use SOCK_CLOEXEC if not available

Colin Walters walters at verbum.org
Fri Aug 6 11:26:51 PDT 2010


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.

(Also note that sd-daemon.c is maintained in the systemd tree, but
since you CC'd Lennart that's good enough)


More information about the dbus mailing list