summaryrefslogtreecommitdiffstats
path: root/src/shared/spawn-polkit-agent.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-11-03 15:56:09 +0100
committerLennart Poettering <lennart@poettering.net>2021-11-03 16:36:09 +0100
commit8f03de5323c86f2e7ce0884e169e2c7180938fbd (patch)
tree83fcdd15e58c113537ce59d1d505030ca9475e6f /src/shared/spawn-polkit-agent.c
parentprocess-util: rework TAKE_PID() to be side-effect free (diff)
downloadsystemd-8f03de5323c86f2e7ce0884e169e2c7180938fbd.tar.xz
systemd-8f03de5323c86f2e7ce0884e169e2c7180938fbd.zip
tree-wide: port various places to use TAKE_PID()
Diffstat (limited to '')
-rw-r--r--src/shared/spawn-polkit-agent.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/shared/spawn-polkit-agent.c b/src/shared/spawn-polkit-agent.c
index cd0b4601da..7fa7508178 100644
--- a/src/shared/spawn-polkit-agent.c
+++ b/src/shared/spawn-polkit-agent.c
@@ -69,9 +69,7 @@ void polkit_agent_close(void) {
return;
/* Inform agent that we are done */
- (void) kill_and_sigcont(agent_pid, SIGTERM);
- (void) wait_for_terminate(agent_pid, NULL);
- agent_pid = 0;
+ sigterm_wait(TAKE_PID(agent_pid));
}
#else