OSDN Git Service

Pass DIRTREE_PROC through the ps callbacks.
authorElliott Hughes <enh@google.com>
Fri, 9 Dec 2016 22:44:08 +0000 (14:44 -0800)
committerRob Landley <rob@landley.net>
Sat, 10 Dec 2016 00:56:07 +0000 (18:56 -0600)
toys/posix/ps.c

index 3a3b8c1..8404e79 100644 (file)
@@ -616,7 +616,7 @@ static int get_ps(struct dirtree *new)
 
   // Recurse one level into /proc children, skip non-numeric entries
   if (!new->parent)
-    return DIRTREE_RECURSE|DIRTREE_SHUTUP
+    return DIRTREE_RECURSE|DIRTREE_SHUTUP|DIRTREE_PROC
       |(DIRTREE_SAVE*(TT.threadparent||!TT.show_process));
 
   memset(slot, 0, sizeof(tb->slot));