tree-wide: port various places to use TAKE_PID()
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user