summaryrefslogtreecommitdiff
path: root/xinit.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@stoeckmann.org>2017-01-30 21:35:37 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2017-01-31 11:22:56 +1000
commit2effad417dabccd0b41ac32dc8108c99c73801d2 (patch)
tree39d459002efcf82605c0d70b524cbb322af58acb /xinit.c
parent710ea2cec2b36831a3b6b5bdae223d18edbea933 (diff)
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'xinit.c')
-rw-r--r--xinit.c2
1 files changed, 1 insertions, 1 deletions
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;