Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCHv2] xserver-nodm: Support reboot from inside X
@ 2015-05-20 18:44 Aníbal Limón
  2015-05-26 21:24 ` Aníbal Limón
  0 siblings, 1 reply; 3+ messages in thread
From: Aníbal Limón @ 2015-05-20 18:44 UTC (permalink / raw)
  To: openembedded-core

From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>

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@gmail.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 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
   ;;
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-27 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20 18:44 [PATCHv2] xserver-nodm: Support reboot from inside X Aníbal Limón
2015-05-26 21:24 ` Aníbal Limón
2015-05-27 14:30   ` Ricardo Ribalda Delgado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox