From 2effad417dabccd0b41ac32dc8108c99c73801d2 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Mon, 30 Jan 2017 21:35:37 +0100 Subject: xinit: check for correct fork error code 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. Signed-off-by: Peter Hutterer --- 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; -- cgit v1.2.1