Bug#514922: xinit: startx should pass error code from xinit
Package: xinit
Version: 1.0.9-2
The following command ends up showing "0" for $? regardless of whether or not
startx actually succeeded:
startx; echo $?
Within the startx script, xinit's return code may be 1, but the commands
after the xinit run clobber $?. It should really be passed up to the user.
I'd suggest the attached patch.
Let me know if I should propose this upstream, too..
--- /usr/bin/startx.orig 2009-02-11 16:39:23.000000000 -0500
+++ /usr/bin/startx 2009-02-11 16:40:10.000000000 -0500
@@ -188,6 +188,7 @@
xinit $client $clientargs -- $server $display $serverargs
+retval=$?
if [ x"$enable_xauth" = x1 ] ; then
@@ -207,9 +208,5 @@
-
-
-
-
-
+exit $retval
Reply to: