diff options
author | Leah Neukirchen <leah@vuxu.org> | 2018-09-17 12:59:16 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2018-09-17 12:59:16 +0200 |
commit | 86e7c446c64441e3d6831bd4d400c99525b9c9f6 (patch) | |
tree | 59d1014f8a0d162cee563e24ff14325aaad1fdf1 | |
parent | d584263e434176a05684026800f45cc15cc73c7a (diff) | |
download | extrace-86e7c446c64441e3d6831bd4d400c99525b9c9f6.tar.gz extrace-86e7c446c64441e3d6831bd4d400c99525b9c9f6.tar.xz extrace-86e7c446c64441e3d6831bd4d400c99525b9c9f6.zip |
pwait: pid 0 is invalid too
-rw-r--r-- | pwait.c | 2 |
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; } |