Page MenuHomeFreeBSD

Fix kvm_getprocs(3) error reporting in ps(1).
ClosedPublic

Authored by trasz on Sep 19 2017, 2:14 PM.
Tags
None
Referenced Files
F103463811: D12414.diff
Mon, Nov 25, 9:02 AM
Unknown Object (File)
Sep 24 2024, 1:01 PM
Unknown Object (File)
Sep 17 2024, 3:07 AM
Unknown Object (File)
Sep 10 2024, 1:21 AM
Unknown Object (File)
Sep 9 2024, 12:47 AM
Unknown Object (File)
Sep 8 2024, 7:11 AM
Unknown Object (File)
Sep 7 2024, 5:07 PM
Unknown Object (File)
Sep 7 2024, 3:24 PM
Subscribers

Details

Summary

Previously it just didn't work at all - kvm_getprocs(3) doesn'tupdate the &nentries when it returns NULL. I'm not sure where the previous logic come from, or what it was supposed to do.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 11631
Build 11977: arc lint + arc unit

Event Timeline

trasz retitled this revision from Fix kvm_getprocs(3) error reporting in ps(1). Previously it just didn't work at all - kvm_getprocs(3) doesn't update the &nentries when it returns NULL. to Fix kvm_getprocs(3) error reporting in ps(1)..
trasz edited the summary of this revision. (Show Details)

Note that 'ps -p <X>' is supposed to only output the header and not fail it seems, so you need to ensure you aren't breaking that. See rS127513 and rS127149 which added the nentries check and explain why. (svn annotate is your friend, there was only one "noise" change of s/0/NULL/ to skip over to find these two commits for the line you are changing)

cem requested changes to this revision.Sep 25 2017, 4:06 PM

(Adding metadata.)

This revision now requires changes to proceed.Sep 25 2017, 4:06 PM
This revision is now accepted and ready to land.Oct 5 2017, 4:02 PM
This revision was automatically updated to reflect the committed changes.