Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: kwoolridge on November 17, 2007, 03:08:31 PM

Title: Replacing default CTRL-C handler
Post by: kwoolridge 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.
Title: Re: Replacing default CTRL-C handler
Post by: Thomas 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