Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Program Exit notification

Status
Not open for further replies.

RichardF

Programmer
Oct 9, 2000
239
GB
Hi,

Is there a way to recieve notification of program termination using c++
(e.g. Task Manager -> End Process).

Simularly, is there a way for when you end a debug session.

Rich.
 
You can probably install a signal handler (using [tt]signal[/tt]) that gets called when the Task Manager sends your program a signal. I don't know which signal you need to catch, though.

You can also install an exit handler (using [tt]atexit[/tt]). That sets up a function to get called when the program is about to exit (except in the event of a crash).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top