]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udevd: configure a child process name for worker processes
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 7 Feb 2023 05:16:11 +0000 (14:16 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 7 Feb 2023 05:38:55 +0000 (14:38 +0900)
This effectively reverts commit ff86c92e3043f71fc801cf687600a480ee8f6778,
and re-apply 49f3ee7e74c714f55aab395c080b1099fc17f7fd.

The change was dropped due to the process name was not correctly logged,
but the issue was fixed by dd15e4cb57129b915e01495e113696bfe0b70214.
Let's set the child process name again.

src/udev/udevd.c

index 6fb0305e0934e90005850c4c6a99824b495f2d4c..c6d24d9c362dd6fcc4a37285f6c7d9b7ba8a317a 100644 (file)
@@ -807,7 +807,7 @@ static int worker_spawn(Manager *manager, Event *event) {
         if (r < 0)
                 return log_error_errno(r, "Worker: Failed to enable receiving of device: %m");
 
-        r = safe_fork(NULL, FORK_DEATHSIG, &pid);
+        r = safe_fork("(udev-worker)", FORK_DEATHSIG, &pid);
         if (r < 0) {
                 event->state = EVENT_QUEUED;
                 return log_error_errno(r, "Failed to fork() worker: %m");