From: Yu Watanabe Date: Tue, 23 Oct 2018 01:18:36 +0000 (+0900) Subject: udev-event: set O_CLOEXEC to pipe fds X-Git-Tag: v240~483^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f71e8ec10e181f6384844ff55012ca499c40a8e9;p=thirdparty%2Fsystemd.git udev-event: set O_CLOEXEC to pipe fds --- diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 55ab625ca0e..18cea2fc217 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -661,11 +661,11 @@ int udev_event_spawn(struct udev_event *event, /* pipes from child to parent */ if (!result || log_get_max_level() >= LOG_INFO) - if (pipe2(outpipe, O_NONBLOCK) != 0) + if (pipe2(outpipe, O_NONBLOCK|O_CLOEXEC) != 0) return log_error_errno(errno, "Failed to create pipe for command '%s': %m", cmd); if (log_get_max_level() >= LOG_INFO) - if (pipe2(errpipe, O_NONBLOCK) != 0) + if (pipe2(errpipe, O_NONBLOCK|O_CLOEXEC) != 0) return log_error_errno(errno, "Failed to create pipe for command '%s': %m", cmd); argv = strv_split_full(cmd, NULL, SPLIT_QUOTES|SPLIT_RELAX);