Re: capturing system shutdown signals?

Stas Boukarev <[email protected]>
Newsgroups gmane.lisp.steel-bank.general
Message-ID <CAF63=12mSAiGv0xmcDETKMZDj0_46=a57-=5ktZ0x5DUZxGc9A@mail.gmail.com>
So I tried
(unwind-protect (sleep 1000) (write-line "UNWIND"))
and then killed it with -SIGTERM and it did print "UNWIND".

On Sat, Apr 27, 2024 at 12:12 AM Nathan Van Ymeren <[email protected]> wrote:

> Linux shutdown scripts typically send SIGTERM to running processes when
> the system is shutting down.
>
> In the past I have used the 'trivial-signal library to handle this:
>
> https://github.com/guicho271828/trivial-signal
>
> Apr 26, 2024 10:13:12 Jeff Cunningham <[email protected]>:
>
> > 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
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.