xserver-nodm: Support reboot from inside X
PATCH v2 1/1 xserver-nodm: Support reboot from inside X
From: Ricardo Ribalda Delgado <[email protected]>
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.
--- meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm +2 -2
@@ -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 ;;
Signature · 1 line
1.9.1
ping...
Quoted 39 lines · Aníbal Limón
From: Ricardo Ribalda Delgado <[email protected]>
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 <[email protected]>Signed-off-by Aníbal Limón <[email protected]>--- meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm +2
-2@@ -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 ;;
I tested the proposed change and works also fine.
Thanks!
Quoted 47 lines · Aníbal Limón
ping...
Quoted 41 lines · Aníbal Limón
From: Ricardo Ribalda Delgado <[email protected]>
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 <[email protected]>Signed-off-by Aníbal Limón <[email protected]>--- 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
meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm +2
-2@@ -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 ;;
Signature · 1 line
Ricardo Ribalda