diff options
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r-- | src/udev/udevd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 5ce11606c9..c205f1d5ec 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -43,6 +43,7 @@ #include "sd-daemon.h" #include "sd-event.h" +#include "terminal-util.h" #include "signal-util.h" #include "event-util.h" #include "netlink-util.h" @@ -435,7 +436,6 @@ static void worker_spawn(Manager *manager, struct event *event) { if (fd_lock >= 0 && flock(fd_lock, LOCK_SH|LOCK_NB) < 0) { log_debug_errno(errno, "Unable to flock(%s), skipping event handling: %m", udev_device_get_devnode(d)); fd_lock = safe_close(fd_lock); - r = -EAGAIN; goto skip; } } @@ -1687,6 +1687,10 @@ int main(int argc, char *argv[]) { log_info("starting version " VERSION); + /* connect /dev/null to stdin, stdout, stderr */ + if (log_get_max_level() < LOG_DEBUG) + (void) make_null_stdio(); + pid = fork(); switch (pid) { case 0: |