[oe-commits] Ricardo Ribalda Delgado : xserver-nodm: Support reboot from inside X

git at git.openembedded.org git at git.openembedded.org
Sat May 30 21:37:14 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 19eaf4a59f4545e049f525d0b0446a9c08d18f0f
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=19eaf4a59f4545e049f525d0b0446a9c08d18f0f

Author: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
Date:   Wed May 20 13:44:18 2015 -0500

xserver-nodm: Support reboot from inside X

If reboot was called from inside the Xserver there could happen a race
condition where chvt would never end, and therefore the whole system was
stalled.

The user could not recover the system by ssh the machine or using the
keyboard.

Running chvt in background fixes the issue.

Also move sleep 1s inside stop to give time for killproc xinit for
fix issue when chvt 1 don't work because X server is still running.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
index 2e3e090..bfa0a8d 100755
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
@@ -48,12 +48,12 @@ case "$1" in
   stop)
         echo "Stopping XServer"
         killproc xinit
-        chvt 1
+        sleep 1
+        chvt 1 &
   ;;
 
   restart)
 	$0 stop
-        sleep 1
         $0 start
   ;;
 



More information about the Openembedded-commits mailing list