X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Fspawn-ask-password-agent.c;h=70466d17e5e3af461122bdfe4d17ad5ba5a66bc8;hp=c1a9c5868140edab497bb43d55c8e5227d4597bd;hb=01c94c5d0aff09b4c0e429d483c8eeba40017071;hpb=f274ece0f76b5709408821e317e87aef76123db6 diff --git a/src/shared/spawn-ask-password-agent.c b/src/shared/spawn-ask-password-agent.c index c1a9c5868..70466d17e 100644 --- a/src/shared/spawn-ask-password-agent.c +++ b/src/shared/spawn-ask-password-agent.c @@ -19,16 +19,13 @@ along with systemd; If not, see . ***/ -#include #include #include -#include -#include #include -#include #include "log.h" #include "util.h" +#include "process-util.h" #include "spawn-ask-password-agent.h" static pid_t agent_pid = 0; @@ -49,7 +46,7 @@ int ask_password_agent_open(void) { SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH, SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH, "--watch", NULL); if (r < 0) - log_error("Failed to fork TTY ask password agent: %s", strerror(-r)); + log_error_errno(r, "Failed to fork TTY ask password agent: %m"); return r; } @@ -62,6 +59,6 @@ void ask_password_agent_close(void) { /* Inform agent that we are done */ kill(agent_pid, SIGTERM); kill(agent_pid, SIGCONT); - wait_for_terminate(agent_pid, NULL); + (void) wait_for_terminate(agent_pid, NULL); agent_pid = 0; }