diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-07 06:33:06 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-07 06:39:49 +0100 |
commit | f3f2d02e9731e65eb15c26980305cd47e028f4fc (patch) | |
tree | a9658f0e205450dd16279d9881ed301fb3d0ab95 /src/udev | |
parent | udevd: configure a child process name for worker processes (diff) | |
download | systemd-f3f2d02e9731e65eb15c26980305cd47e028f4fc.tar.xz systemd-f3f2d02e9731e65eb15c26980305cd47e028f4fc.zip |
tree-wide: set FORK_RLIMIT_NOFILE_SAFE flag
No functional changes, just refactoring.
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udev-event.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 6d47a2a49d..ec4ad30824 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -23,7 +23,6 @@ #include "parse-util.h" #include "path-util.h" #include "process-util.h" -#include "rlimit-util.h" #include "signal-util.h" #include "stdio-util.h" #include "string-util.h" @@ -811,7 +810,7 @@ int udev_event_spawn( log_device_debug(event->dev, "Starting '%s'", cmd); - r = safe_fork("(spawn)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG, &pid); + r = safe_fork("(spawn)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG|FORK_RLIMIT_NOFILE_SAFE, &pid); if (r < 0) return log_device_error_errno(event->dev, r, "Failed to fork() to execute command '%s': %m", cmd); @@ -820,7 +819,6 @@ int udev_event_spawn( _exit(EXIT_FAILURE); (void) close_all_fds(NULL, 0); - (void) rlimit_nofile_safe(); DEVICE_TRACE_POINT(spawn_exec, event->dev, cmd); |