Date: Wed, 8 May 1996 10:30:46 +0200 (IST) From: Eli Zaretskii To: Barry A Giffel Cc: djgpp AT delorie DOT com Subject: Re: ANSI C signal definitions In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 7 May 1996, Barry A Giffel wrote: > My first question is, should SIGINT be defined for ANSI or not? Just edit your 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.