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
Unknown Object (File)
Mar 22 2024, 10:22 PM
Unknown Object (File)
Mar 22 2024, 10:22 PM
Unknown Object (File)
Mar 22 2024, 10:21 PM
Unknown Object (File)
Mar 22 2024, 10:21 PM
Unknown Object (File)
Mar 8 2024, 3:26 PM
Unknown Object (File)
Jan 6 2024, 8:45 AM
Unknown Object (File)
Jan 6 2024, 8:45 AM
Unknown Object (File)
Jan 6 2024, 8:45 AM
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 Not Applicable
Unit
Tests Not Applicable

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.