Re: capturing system shutdown signals?
Stas Boukarev <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <CAF63=10VW6nsCi+mv6XRsPCpW3moOJhdKrWkXCOUTepSnc5mvA@mail.gmail.com> |
Catching unix signals won't help programs that can't unwind cleanly. Unless you just ignore them. On Sat, Apr 27, 2024 at 1:52 AM Grégory Vanuxem <[email protected]> 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. Eventually more since there are also some other terminaison > mechanisms, but I think the SBCL debugger is invoked there, for example > floating-point exceptions (division by 0 for example). See man signal(s). > > https://pubs.opengroup.org/onlinepubs/7908799/xsh/signal.h.html > > > - Greg > > > > > > > Le sam. 27 avr. 2024 à 00:31, Stas Boukarev <[email protected]> a écrit : > >> My "man kill" doesn't contain the word "shutdown" and >> kill -L >> says >> kill: unknown signal: SIGL >> >> On Sat, Apr 27, 2024 at 1:15 AM Jeff Cunningham <[email protected]> >> wrote: >> >>> See "man kill" or "kill -L" for a list. >>> >>> >>> >>> >>> On Fri, 26 Apr 2024 23:36:18 +0300 >>> Stas Boukarev <[email protected]> wrote: >>> >>> > What's a shutdown signal? >>> > >>> > On Fri, Apr 26, 2024 at 8:14 PM Jeff Cunningham < >>> [email protected]> >>> > wrote: >>> > >>> > > Is there a way to capture a general shutdown signal in a running >>> > > sbcl-compiled program (Hunchentoot >>> > > server) so it can gracefully do some house-keeping first? This is >>> running >>> > > on a Linux platform. I >>> > > had a binary data file destroyed the other day from improper closure >>> while >>> > > writing. >>> > > >>> > > Best regards, >>> > > >>> > > -- Jeff >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > _______________________________________________ >>> > > 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