comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry Shykhman" <dshykhman@mail.ru>
Subject: Re: Gracefully detecting program termination.
Date: Wed, 22 Oct 2003 16:54:27 +0200
Date: 2003-10-22T16:54:27+02:00	[thread overview]
Message-ID: <newscache$5ty5nh$zbg$1@lnews.actcom.co.il> (raw)
In-Reply-To: MPG.19ffcb3643db1f8989776@News.CIS.DFN.DE


"Jano" <nono@celes.unizar.es> wrote in message
news:MPG.19ffcb3643db1f8989776@News.CIS.DFN.DE...
> I have a program that runs under Win32 and Linux. It's a daemon-like
> tool, so it is launched on startup and runs until system goes down.
>
> Now I'm interested in it detecting when the shutdown is happening to
> save some data and do a graceful ending.
>
> In Linux I think it suffices to trap SIGTERM and company. In Windows
> I've seen that I could catch Ctrl-C that way but not a system shutdown.
>

Try to check WM_QUERYENDSESSION message





  reply	other threads:[~2003-10-22 14:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-21 22:02 Gracefully detecting program termination Jano
2003-10-22 14:54 ` Dmitry Shykhman [this message]
2003-10-22 19:00   ` Jano
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox