Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C - C++ Learning > Any Kind of do_...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 4068 of 4306
Post > Topic >>

Any Kind of do_on_exit() in C or C++?

by Hal Vaughan <hal@[EMAIL PROTECTED] > Mar 13, 2008 at 09:56 PM

In Java actions can be set to perform on exit.  Is there any way to do that
in C or C++?  Is there any way to catch a kill signal and if one is sent,
do some closing down routines before dying?

I need to be able to shut down the connection to hardware when the program
ends and most of the time that isn't an issue (since I have an exit
command), but it would help if there were a way to do that if the program
were killed accidently as well.  (And I'm sure there's no way to do that
in
case of a crash or core dump!)

Thanks!

Hal
 




 6 Posts in Topic:
Any Kind of do_on_exit() in C or C++?
Hal Vaughan <hal@[EMAI  2008-03-13 21:56:57 
Re: Any Kind of do_on_exit() in C or C++?
Ian Collins <ian-news@  2008-03-14 11:09:02 
Re: Any Kind of do_on_exit() in C or C++?
Jeff Schwab <jeff@[EMA  2008-03-13 15:27:00 
Re: Any Kind of do_on_exit() in C or C++?
Hal Vaughan <hal@[EMAI  2008-03-13 23:26:35 
Re: Any Kind of do_on_exit() in C or C++?
Jeff Schwab <jeff@[EMA  2008-03-13 19:08:49 
Re: Any Kind of do_on_exit() in C or C++?
Micah Cowan <micah@[EM  2008-03-14 09:51:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 12:13:40 CDT 2008.