Jump to content

Recommended Posts

Posted

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?

Posted

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...

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
  • Recently Browsing   0 members

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