summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-09-17 12:59:16 +0200
committerLeah Neukirchen <leah@vuxu.org>2018-09-17 12:59:16 +0200
commit86e7c446c64441e3d6831bd4d400c99525b9c9f6 (patch)
tree59d1014f8a0d162cee563e24ff14325aaad1fdf1
parentd584263e434176a05684026800f45cc15cc73c7a (diff)
downloadextrace-86e7c446c64441e3d6831bd4d400c99525b9c9f6.tar.gz
extrace-86e7c446c64441e3d6831bd4d400c99525b9c9f6.tar.xz
extrace-86e7c446c64441e3d6831bd4d400c99525b9c9f6.zip
pwait: pid 0 is invalid too
-rw-r--r--pwait.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pwait.c b/pwait.c
index e6fde39..e5f6fde 100644
--- a/pwait.c
+++ b/pwait.c
@@ -180,7 +180,7 @@ usage:
 	for (n = m = 0; n < argc; n++) {
 		errno = 0;
 		pid = strtol(argv[n], &end, 10);
-		if (pid < 0 || *end || errno != 0) {
+		if (pid <= 0 || *end || errno != 0) {
 			fprintf(stderr, "%s: invalid process id\n", argv[n]);
 			continue;
 		}