Bug 19069 - ps exit(0) instead of exit(1) when nentries == 0
Summary: ps exit(0) instead of exit(1) when nentries == 0
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-06-06 20:10 UTC by odinn
Modified: 2000-07-08 06:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description odinn 2000-06-06 20:10:01 UTC
ps should error on exit when no entries are displayed.

Fix: 

line 358 of /usr/src/bin/ps/ps.c
should be
     exit(1);

not
     exit(0);
How-To-Repeat: ps -p 99999999 (or any non-existant pid)
Comment 1 Will Andrews freebsd_committer freebsd_triage 2000-07-08 06:15:46 UTC
State Changed
From-To: open->closed

Fixed in HEAD, RELENG_4, and RELENG_3.  Thanks!