comp.lang.ada
 help / color / mirror / Atom feed
From: Jano <nono@celes.unizar.es>
Subject: Gracefully detecting program termination.
Date: Wed, 22 Oct 2003 00:02:01 +0200
Date: 2003-10-22T00:02:01+02:00	[thread overview]
Message-ID: <MPG.19ffcb3643db1f8989776@News.CIS.DFN.DE> (raw)

Hello fellow Adagoers,

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.

I'm still in the process of investigating it so I haven't still reached 
a dead end, but just in case someone is doing this already and can throw 
me a quick pointer in the way to go...

Thanks!



             reply	other threads:[~2003-10-21 22:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-21 22:02 Jano [this message]
2003-10-22 14:54 ` Gracefully detecting program termination Dmitry Shykhman
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