Re: capturing system shutdown signals?

Hraban via Sbcl-help <[email protected]>
Newsgroups gmane.lisp.steel-bank.general
Message-ID <[email protected]>
As Alexander said in his e-mail: sigkill can't be caught. That's by design.

On 4/27/24 4:42 PM, Jeff Cunningham wrote:
> I noticed that trivial-signal can't intercept a SIGKILL. That bullet must be made of silver.
> 
> ⁣Get BlueMail for Android ​
> 
> On Apr 27, 2024, 16:34, at 16:34, Alexander Schreiber <[email protected]> wrote:
>> On Sat, Apr 27, 2024 at 12:51:49AM +0200, Grégory Vanuxem wrote:
>>> I think the signal-handler stuff in the UNIX package should help you.
>>> Install one or more handler(s) I guess:
>>>
>>> https://github.com/sbcl/sbcl/blob/master/src/code/signal.lisp
>>>
>>> For Unix-like (POSIX)
>>> signals, see:
>>>
>>>
>> https://sites.uclouvain.be/SystInfo/usr/include/asm-generic/signal.h.html
>>>
>>>
>>> You will first need to handle the SIGTERM, 15 , but eventually 9,
>> hard
>>> kill.
>>
>>
>> Good luck trying to handle SIGKILL. Please report back once you've had
>> success. Patching the kernel counts as cheating.
>> ^L
>> SIGKILL is not catchable at all, by intention - it's the final
>> "KILL IT NOW" signal to shoot down a process and the only way for
>> a process to (temporarily) "survive" SIGKILL is to be stuck in
>> status D (uninterruptible sleep) - until the process comes out of
>> status D at which point it promptly dies.
>>
>> Kind regards,
>>            Alex.
>> --
>> "Opportunity is missed by most people because it is dressed in overalls
>> and
>> looks like work."                                      -- Thomas A.
>> Edison
>>
>>
>> _______________________________________________
>> Sbcl-help mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/sbcl-help
> 
> 
> 
> _______________________________________________
> Sbcl-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sbcl-help



_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.