agents: use kill_and_sigcont() where appropriate
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Dec 2017 14:10:56 +0000 (15:10 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 25 Dec 2017 10:48:21 +0000 (11:48 +0100)
src/shared/spawn-ask-password-agent.c
src/shared/spawn-polkit-agent.c

index a99c467..17785fd 100644 (file)
@@ -57,8 +57,7 @@ void ask_password_agent_close(void) {
                 return;
 
         /* Inform agent that we are done */
-        (void) kill(agent_pid, SIGTERM);
-        (void) kill(agent_pid, SIGCONT);
+        (void) kill_and_sigcont(agent_pid, SIGTERM);
         (void) wait_for_terminate(agent_pid, NULL);
         agent_pid = 0;
 }
index c6bd65e..886248b 100644 (file)
@@ -83,9 +83,7 @@ void polkit_agent_close(void) {
                 return;
 
         /* Inform agent that we are done */
-        (void) kill(agent_pid, SIGTERM);
-        (void) kill(agent_pid, SIGCONT);
-
+        (void) kill_and_sigcont(agent_pid, SIGTERM);
         (void) wait_for_terminate(agent_pid, NULL);
         agent_pid = 0;
 }