On Wed, Jul 18, 2012 at 11:58:12PM +0200, Jürgen A. Erhard wrote:
> Forgot to attach the mentioned attachment 8D
Yes, and I didn't see your subsequent email until I sent mine.

The problem is that pstree is doing the sorting while scanning /proc.
If a parent process ID is not found in the existing tree it is initially
called "?" and then when its found later is renamed.

The problem is between making this fake parent and giving the parent
its real name, the parent's siblings can be found in /proc and added to
the grandparents list. As "?" is not its final name then anything
sorting against this will be wrong.

So you'll get series of correct processes and then some wierd steps,
just like you see in your example output.

The fix is to scan all (or the part you need) of /proc and THEN sort
once you have all the names, or re-sort amongst your siblings once you
have a process renamed from "?".

 - Craig

-- 
Craig Small VK2XLZ   http://enc.com.au/          csmall at : enc.com.au
Debian GNU/Linux     http://www.debian.org/      csmall at : debian.org
GPG fingerprint:     5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to