summaryrefslogtreecommitdiffstats
path: root/src/shared/spawn-ask-password-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-ask-password-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 'src/shared/spawn-ask-password-agent.c')
-rw-r--r--src/shared/spawn-ask-password-agent.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/shared/spawn-ask-password-agent.c b/src/shared/spawn-ask-password-agent.c
index 38fab21203..902d7543a5 100644
--- a/src/shared/spawn-ask-password-agent.c
+++ b/src/shared/spawn-ask-password-agent.c
@@ -43,9 +43,7 @@ void ask_password_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));
}
int ask_password_agent_open_if_enabled(BusTransport transport, bool ask_password) {