diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2015-04-29 10:33:19 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-04-29 10:33:19 +0100 |
commit | e7016d30f3a0ae817c77ccbd962f776ac3e7e100 (patch) | |
tree | 88d4dd8e56276d35f57aff0db24868ecc5b382fd /src | |
parent | 1a67dacd7514c3327ca0fd27e617309fd437e44f (diff) |
backlight: Do not hang forever if helper pid is -1
Backlight helper PID is set to -1 by default, if for some reason it's
not set, we may end up with waitpid(-1, ...) which will hang forever.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90230
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/backlight.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backlight.c b/src/backlight.c index 84d8f761..c65e466b 100644 --- a/src/backlight.c +++ b/src/backlight.c @@ -523,7 +523,7 @@ void backlight_disable(struct backlight *b) void backlight_close(struct backlight *b) { backlight_disable(b); - if (b->pid) + if (b->pid > 0) waitpid(b->pid, NULL, 0); } |