Sign in to follow this  
Followers 0
Teslafreak

Handling of signals

3 posts in this topic

Is there a way to handle signals? For example, I am writing a console app, and I need it to run a function before closing if someone issues it Ctrl+C. I believe this is SIGINT, and I found some references to sending it to processes, but can't find anything about handling it. Any ideas?

Share this post


Link to post
Share on other sites



Is there a way to handle signals? For example, I am writing a console app, and I need it to run a function before closing if someone issues it Ctrl+C. I believe this is SIGINT, and I found some references to sending it to processes, but can't find anything about handling it. Any ideas?

Teslafreak

I've posted an example of the SetConsoleCtrlHandler API in the Examples forum

Console app 'OnAutoItExit' callback function

enjoy


I see fascists...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0