in reply to ctrl + c on Win32 (signal handling)

Personally, I get nervous about “signals” especially where databases are involved.   (A signal can come in at any time, which seems to always mean, the worst time.

Could this requirement not be addressed equally well, simply by having the program disconnect from the database before it sleeps for 30 seconds, then reconnect again?

Replies are listed 'Best First'.
Re^2: ctrl + c on Win32 (signal handling)
by remiah (Hermit) on Aug 26, 2011 at 14:16 UTC
    My program converts images on consle with ImageMagick while I 'm selecting proper image on database application. So I don't want to wait the conversion process while I am working to select proper image.

    After reading your comments, one thing I can think of... to create little Tk widget with quit button and disconnect from database with callback function or widget destroy event.

    ctrl + c is very handy for me, I would like to have some kind of key press event handler like solution for console, if I could...

    Thnaks for your reply.