diff options
author | Reiner Herrmann <reiner@reiner-h.de> | 2019-07-11 19:15:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-11 19:15:22 +0000 |
commit | 0fca48c4231bc65248eb7e7080a791dcfc42af1c (patch) | |
tree | 72ba9c09bba51839982fd6788372c85763fc598d /src | |
parent | Update libpostexecseccomp.c (#2851) (diff) | |
parent | Update pid.c (diff) | |
download | firejail-0fca48c4231bc65248eb7e7080a791dcfc42af1c.tar.gz firejail-0fca48c4231bc65248eb7e7080a791dcfc42af1c.tar.zst firejail-0fca48c4231bc65248eb7e7080a791dcfc42af1c.zip |
Merge pull request #2850 from disconnect3d/patch-1
Update pid.c
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/pid.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/pid.c b/src/lib/pid.c index c4235ede3..04bc8d132 100644 --- a/src/lib/pid.c +++ b/src/lib/pid.c | |||
@@ -329,10 +329,9 @@ void pid_read(pid_t mon_pid) { | |||
329 | } | 329 | } |
330 | } | 330 | } |
331 | 331 | ||
332 | pid_t child = -1; | ||
333 | struct dirent *entry; | 332 | struct dirent *entry; |
334 | char *end; | 333 | char *end; |
335 | while (child < 0 && (entry = readdir(dir))) { | 334 | while ((entry = readdir(dir))) { |
336 | pid_t pid = strtol(entry->d_name, &end, 10); | 335 | pid_t pid = strtol(entry->d_name, &end, 10); |
337 | pid %= max_pids; | 336 | pid %= max_pids; |
338 | if (end == entry->d_name || *end) | 337 | if (end == entry->d_name || *end) |