[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    Re: [PATCH] xinit: check for correct fork error code
From:       Alan Coopersmith <alan.coopersmith () oracle ! com>
Date:       2017-01-31 2:20:25
Message-ID: 1ab78407-bfa0-3f3f-74b3-c978b762a491 () oracle ! com
[Download RAW message or body]

On 01/30/17 12:35 PM, Tobias Stoeckmann wrote:
> Even though this code is only active on __sun machines, the fork return
> value should be checked for -1, not 1, to detect an error situation.
> ---
>  xinit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xinit.c b/xinit.c
> index 1b04911..f826b7a 100644
> --- a/xinit.c
> +++ b/xinit.c
> @@ -638,7 +638,7 @@ shutdown(void)
>              Fatal("Unable to run program \"%s\"", "kbd_mode");
>              break;
>
> -        case 1:
> +        case -1:
>              Error("fork failed");
>              break;

Oops!  Thanks for finding & fixing this mistake in the patch I applied out
of our downstream branch, and thanks to whot for pushing it already.

-- 
	-Alan Coopersmith-              alan.coopersmith@oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic