summaryrefslogtreecommitdiffstats
path: root/src/udev/udevadm-control.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-12-13 21:30:58 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-12-18 12:05:26 +0100
commitccadf9ac0d6d206767294b3f96f41eb42b48d1b0 (patch)
tree1f7ee6414278dfa841a6fca7e2acb4ecd5c949d9 /src/udev/udevadm-control.c
parentudev-ctrl: make udev_ctrl_send() accept integer and string through a single a... (diff)
downloadsystemd-ccadf9ac0d6d206767294b3f96f41eb42b48d1b0.tar.xz
systemd-ccadf9ac0d6d206767294b3f96f41eb42b48d1b0.zip
udev: do not kill "udevadm control" process in the same cgroup
Fixes #16867.
Diffstat (limited to 'src/udev/udevadm-control.c')
-rw-r--r--src/udev/udevadm-control.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/udev/udevadm-control.c b/src/udev/udevadm-control.c
index 06c61e5c07..720e09a70f 100644
--- a/src/udev/udevadm-control.c
+++ b/src/udev/udevadm-control.c
@@ -87,6 +87,11 @@ int control_main(int argc, char *argv[], void *userdata) {
if (r < 0)
return log_error_errno(r, "Failed to initialize udev control: %m");
+ /* See comments in on_post() in udevd.c. */
+ r = udev_ctrl_send_pid(uctrl);
+ if (r < 0)
+ return log_error_errno(r, "Failed to send pid of this process: %m");
+
while ((c = getopt_long(argc, argv, "el:sSRp:m:t:Vh", options, NULL)) >= 0)
switch (c) {
case 'e':