chiark / gitweb /
units: make networkd pull in its own .busname unit
[elogind.git] / src / shared / spawn-ask-password-agent.c
index 6e31d8d138e8dd3103213c22d276536ce6404720..70466d17e5e3af461122bdfe4d17ad5ba5a66bc8 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <sys/types.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <string.h>
-#include <sys/prctl.h>
 #include <signal.h>
-#include <fcntl.h>
 
 #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_errno(-r, "Failed to fork TTY ask password agent: %m");
+                log_error_errno(r, "Failed to fork TTY ask password agent: %m");
 
         return r;
 }