summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2000-07-08 05:13:10 +0000
committerwill <will@FreeBSD.org>2000-07-08 05:13:10 +0000
commit1332543d7695dd9dc19055ab38090131deccf7d2 (patch)
tree6ec036efeeacd9c2455776b9db41b96c1fc67089 /bin
parente5f758a57666538dacb556f7fd894d37e13542cb (diff)
downloadFreeBSD-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.c2
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
*/
OpenPOWER on IntegriCloud