All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xserver-nodm: Support reboot from inside X
@ 2015-05-11 15:23 Ricardo Ribalda Delgado
  2015-05-20  8:34 ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Ribalda Delgado @ 2015-05-11 15:23 UTC (permalink / raw)
  To: níbal Limón, Dan McGregor, Darren Hart, Richard Purdie,
	openembedded-core

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.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 2e3e09077792..31f545f79199 100755
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
@@ -48,7 +48,7 @@ case "$1" in
   stop)
         echo "Stopping XServer"
         killproc xinit
-        chvt 1
+        chvt 1 &
   ;;
 
   restart)
-- 
2.1.4



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

* Re: [PATCH] xserver-nodm: Support reboot from inside X
  2015-05-11 15:23 [PATCH] xserver-nodm: Support reboot from inside X Ricardo Ribalda Delgado
@ 2015-05-20  8:34 ` Ricardo Ribalda Delgado
  2015-05-20 17:03   ` Aníbal Limón
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Ribalda Delgado @ 2015-05-20  8:34 UTC (permalink / raw)
  To: níbal Limón, Dan McGregor, Darren Hart, Richard Purdie,
	openembedded-core

ping?

On Mon, May 11, 2015 at 5:23 PM, Ricardo Ribalda Delgado
<ricardo.ribalda@gmail.com> wrote:
> 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.
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
>  meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 2e3e09077792..31f545f79199 100755
> --- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
> +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
> @@ -48,7 +48,7 @@ case "$1" in
>    stop)
>          echo "Stopping XServer"
>          killproc xinit
> -        chvt 1
> +        chvt 1 &
>    ;;
>
>    restart)
> --
> 2.1.4
>



-- 
Ricardo Ribalda


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

* Re: [PATCH] xserver-nodm: Support reboot from inside X
  2015-05-20  8:34 ` Ricardo Ribalda Delgado
@ 2015-05-20 17:03   ` Aníbal Limón
  0 siblings, 0 replies; 3+ messages in thread
From: Aníbal Limón @ 2015-05-20 17:03 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado, Dan McGregor, Darren Hart,
	Richard Purdie, openembedded-core

Hi Ricardo,

I tested your patch and it's ok another improvement to it will be add a 
sleep 1 before chvt
because killproc xinit don't take a defined time to shutdown and chvt 
didn't work because
X it's running.

I'll modify a little your patch and send v2 with your signature.

Regards,
     alimon

On 20/05/15 03:34, Ricardo Ribalda Delgado wrote:
> ping?
>
> On Mon, May 11, 2015 at 5:23 PM, Ricardo Ribalda Delgado
> <ricardo.ribalda@gmail.com> wrote:
>> 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.
>>
>> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>> ---
>>   meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> 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 2e3e09077792..31f545f79199 100755
>> --- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
>> +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
>> @@ -48,7 +48,7 @@ case "$1" in
>>     stop)
>>           echo "Stopping XServer"
>>           killproc xinit
>> -        chvt 1
>> +        chvt 1 &
>>     ;;
>>
>>     restart)
>> --
>> 2.1.4
>>
>
>



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

end of thread, other threads:[~2015-05-20 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-11 15:23 [PATCH] xserver-nodm: Support reboot from inside X Ricardo Ribalda Delgado
2015-05-20  8:34 ` Ricardo Ribalda Delgado
2015-05-20 17:03   ` Aníbal Limón

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.