summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tty-ask-password-agent.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tty-ask-password-agent.c b/src/tty-ask-password-agent.c
index 4a29abacbb..d7e1ebaef6 100644
--- a/src/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent.c
@@ -291,6 +291,13 @@ static int parse_password(const char *filename, char **wall) {
}
}
+ if (pid > 0 &&
+ kill(pid, 0) < 0 &&
+ errno == ESRCH) {
+ r = 0;
+ goto finish;
+ }
+
if (arg_action == ACTION_LIST)
printf("'%s' (PID %u)\n", message, pid);
else if (arg_action == ACTION_WALL) {