This Space for Rent

New Code! (half a bee is better than none edition)

pstree has finally slowed down enough so I can nail it down and go on to the next shiny bauble on my list. Version 0.5 cleans up a few of the dangling bugs in 0.3 (the notable one was the erratic garbage appearing at the end of clipped lines), adds one new feature (-A, which prints the full pathname for each command in the heirarchy), modifies -a to take the command name from the argument list instead of using the actual command name [so if the program changes argv[0] to "OOchy mcbaba!", that's the name that pstree -a will display] and does a few more fussy tweaks to the code just because it's there.

When pstree 0.5 installs, it will attempt to put the setuid bit on if it's using kvm_getprocs(3) or sysctl(3) to pick out process information (kvm_getprocs() needs to be root to even get the process list, sysctl() needs to be root to KVM_PROCARGS2 processes that belong to other people. There may be security holes here -- I don't actually write anything back into system space and I try to pay attention to what I'm writing to, but 4 days of evening hacking to decompress from my job isn't really conducive to putting the Q back into uality. But it's still New Code!, and where would that be without one or two magic cookies hidden away for the security auditors?)