bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] console-client: Exit on SIGTERM


From: David Michael
Subject: Re: [PATCH] console-client: Exit on SIGTERM
Date: Fri, 18 Jul 2014 19:11:59 -0400

On Thu, Jul 17, 2014 at 12:40 PM, Samuel Thibault
<samuel.thibault@gnu.org> wrote:
> David Michael, le Wed 16 Jul 2014 21:56:36 -0400, a écrit :
>> +/* Exit the console client on SIGTERM. */
>> +static void
>> +signal_handler (int signum)
>> +{
>> +  if (signum == SIGTERM)
>> +    console_exit ();
>> +}
>
> We can't just call console_exit() in the middle of the signal handler:
> SIGTERM could very well happen while driver_list_lock is taken,
> driver_fini would then deadlock.  The signal handler should rather make
> the cons_server_loop function return.

Okay, thanks for the information.  I'll try to figure that out and
resend at some point.  Or if anyone else knows how to do it that way
offhand and is up for writing it, I'd be grateful.

David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]