ptree zone handling is broken
11906 Add line drawing characters to ptree(1)
ptree zone handling is broken.
The problem is that proc_walk is defined not to iterate on SSYS procs. But this
means we don't include zone's "zsched" processes. As a result, all zone processes
end up as orphaned children of proc0, and are therefore ignored unless -a is also specified.
This can hopefully be fixed by adding a PROC_WALK_SYS flag to proc_walk().
Updated by Jason King 8 days ago
To test, I built new versions of libproc and ptree w/ the changes. I then ran ptree, setting LD_LIBRARY_PATH so ptree used the updated libproc (verified by running ldd after setting LD_LIBRARY_PATH), and then compared the output to a copy of ptree from prior to #11906 (without LD_LIBRARY_PATH set as well). Aside from the pid for each respective ptree invocation, the output was identical (ignoring minor whitespace differences).
I then preformed the same test, but on a SmartOS zone that was up and running (ptree -z zonename). The output from both the older ptree and the new ptree were identical (ignoring minor whitespace differences).