diff options
-rw-r--r-- | extrace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extrace.c b/extrace.c index e3a441a..4848a6f 100644 --- a/extrace.c +++ b/extrace.c @@ -140,6 +140,9 @@ pid_depth(pid_t pid) char *s; int fd, d, i; + if (pid == 1) + return 0; + snprintf(name, sizeof name, "/proc/%d/stat", pid); if ((fd = open(name, O_RDONLY)) < 0) |