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
This commit is contained in:
Will Andrews 2000-07-08 05:13:10 +00:00
parent 59a821dae2
commit f8c9c11c5c

View File

@ -355,7 +355,7 @@ main(argc, argv)
*/
printheader();
if (nentries == 0)
exit(0);
exit(1);
/*
* sort proc list
*/