Mail Archives: djgpp/1996/05/08/03:42:33
On 7 May 1996, Barry A Giffel wrote:
> My first question is, should SIGINT be defined for ANSI or not?
Just edit your <signal.h> and move SIGINT definition to the ANSI part.
> Next, if SIGINT should not be defined, what's the best way to trap
> this signal. When a user presses Control-C, the SIGINT signal is
> generated, I need to be able to catch this signal and run a signal
> handler routine before exiting.
It should work after you move the definition and define a signal handler
for SIGINT. Note that if your program switches stdin to BINARY mode, ^C
won't generat SIGINT unless you call `__djgpp_set_ctrl_c' with a non-zero
argument. Ctrl-Break always generates SIGINT.
- Raw text -