summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2021-02-01 12:25:35 -0500
committerJakob Kaivo <jkk@ung.org>2021-02-01 12:25:35 -0500
commita9e81927df6906e563492bc18e068e4184909794 (patch)
treeb7ed3944ef5be6638eb86e74240d498bb4bd4399
parente5a6c8fc44531e43ca0406082468c5b9a4ac2b4e (diff)
fix conditional on call to waitpid()
-rw-r--r--privexec/privexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/privexec/privexec.c b/privexec/privexec.c
index 1b7a54e..4e3816c 100644
--- a/privexec/privexec.c
+++ b/privexec/privexec.c
@@ -30,7 +30,7 @@ static int check_privileges(char *argv[])
}
int status = 1;
- if (waitpid(pid, &status, 0) != 0) {
+ if (waitpid(pid, &status, 0) == -1) {
perror(PATH_CHECK);
return 1;
}