xf86-video-intel: src/backlight.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Apr 29 02:34:55 PDT 2015


 src/backlight.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e7016d30f3a0ae817c77ccbd962f776ac3e7e100
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Wed Apr 29 10:33:19 2015 +0100

    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 at redhat.com>

diff --git a/src/backlight.c b/src/backlight.c
index 84d8f76..c65e466 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);
 }
 


More information about the xorg-commit mailing list