diff options
author | Daniel Mack <github@zonque.org> | 2015-08-31 13:58:29 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-08-31 13:58:29 +0200 |
commit | d728d7faa6c60f185be72510d87bcc565bc0846a (patch) | |
tree | 4d2ed7404804998cbc10abf0419fac34719c57be /src/basic/process-util.c | |
parent | abab50081c8c12cc46482a43264deb46853bb8fa (diff) | |
parent | dcd719908229479b0b6ec14d6c1362eb82b1bbf3 (diff) |
Merge pull request #1093 from poettering/unified-prepare
A variety of clean-ups
Diffstat (limited to 'src/basic/process-util.c')
-rw-r--r-- | src/basic/process-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c index 61f188467f..cff2d2a034 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -181,10 +181,10 @@ int is_kernel_thread(pid_t pid) { bool eof; FILE *f; - if (pid == 0) + if (pid == 0 || pid == 1) /* pid 1, and we ourselves certainly aren't a kernel thread */ return 0; - assert(pid > 0); + assert(pid > 1); p = procfs_file_alloca(pid, "cmdline"); f = fopen(p, "re"); |