52bd019d8c
This commit addresses a potentially disastrous flaw in that fatal_proc_unmounted() function wherein requested item(s) might not have been returned to the caller yet were specified at the time of a 'new' or 'reset' call. The root cause, uncovered by Craig, was due to the old library look_up_our_self() support function which only would populate a proc_t with limited 'stat' file data. This routine will now act the same as all other <pids> functions which return a stack or stacks. Whatever was specified with a 'new' or 'reset' will be returned, if the passed 'return_self' parameter is other than zero. [ as is so often the case, when flawed code is fixed ] [ former complexity can be reduced as a side benefit ] Reference(s): https://www.freelists.org/post/procps/issue-245-plus-one,2 Signed-off-by: Jim Warner <james.warner@comcast.net>