diff options
author | will <will@FreeBSD.org> | 2000-07-08 05:13:10 +0000 |
---|---|---|
committer | will <will@FreeBSD.org> | 2000-07-08 05:13:10 +0000 |
commit | 1332543d7695dd9dc19055ab38090131deccf7d2 (patch) | |
tree | 6ec036efeeacd9c2455776b9db41b96c1fc67089 /bin | |
parent | e5f758a57666538dacb556f7fd894d37e13542cb (diff) | |
download | FreeBSD-src-1332543d7695dd9dc19055ab38090131deccf7d2.zip FreeBSD-src-1332543d7695dd9dc19055ab38090131deccf7d2.tar.gz |
Fix the exit code for the case where nentries == 0; if a PID doesn't exist,
ps(1) should not be returning a success code (0), it should return an
error code (1). This was fixed on OpenBSD over 3 years ago.
PR: 19069
Submitted by: Jim Sloan <odinn@atlantabiker.net>
Reviewed by: rwatson
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ps/ps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 004b0a7..a3411e1 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -355,7 +355,7 @@ main(argc, argv) */ printheader(); if (nentries == 0) - exit(0); + exit(1); /* * sort proc list */ |