Jump to content

Handling of signals


Recommended Posts

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?

Link to comment
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...

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...