Welcome, Guest. Please login or register.

Author Topic: Replacing default CTRL-C handler  (Read 1098 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline kwoolridgeTopic starter

  • Newbie
  • *
  • Join Date: Sep 2007
  • Posts: 8
    • Show only replies by kwoolridge
Replacing default CTRL-C handler
« on: November 17, 2007, 03:08:31 PM »
Hello,

I want to replace the default console CTRL-C handler and, before my program exits, replace the original.  I know there is a routine the C/C++ libraries that will do this.  However, I am writing this in Assembly language.

My thoughts are: put the new handler address in the process structure at location tc_ExceptCode and put $00001000 at location tc_SigWait.  Is this correct?

Thank you.
 

Online Thomas

Re: Replacing default CTRL-C handler
« Reply #1 on: November 17, 2007, 07:45:14 PM »

There is no handler for Ctrl-C. Ctrl-C is a signal which is sent to your process. Use exec.library/SetSignal(0,0) to get all signals currently active and check if SIGBREAKF_CTRL_C is set.

Bye,
Thomas