tree-wide: port various places to use TAKE_PID()

This commit is contained in:
Lennart Poettering
2021-11-03 16:36:09 +01:00
parent 883946f0d2
commit 8f03de5323
14 changed files with 18 additions and 33 deletions
+1 -1
View File
@@ -286,7 +286,7 @@ void pager_close(void) {
stdout_redirected = stderr_redirected = false;
(void) kill(pager_pid, SIGCONT);
(void) wait_for_terminate(pager_pid, NULL);
(void) wait_for_terminate(TAKE_PID(pager_pid), NULL);
pager_pid = 0;
}
+1 -3
View File
@@ -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) {
+1 -3
View File
@@ -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