| delorie.com/archives/browse.cgi | search |
| Date: | Sun, 18 Apr 1999 14:07:23 +0300 (IDT) |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| X-Sender: | eliz AT is |
| To: | taupin <taupin AT lps DOT u-psud DOT fr> |
| cc: | DJGPP List <djgpp AT delorie DOT com> |
| Subject: | Re: Disabling ^C |
| In-Reply-To: | <371760E3.181FDF22@lps.u-psud.fr> |
| Message-ID: | <Pine.SUN.3.91.990418140700.22615Z-100000@is> |
| MIME-Version: | 1.0 |
| Reply-To: | djgpp AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
On Fri, 16 Apr 1999, taupin wrote:
> Wordk OK but now, if I incidentally depress ^C, then microemacs is
> killed... withour any save. Therefore my question:
>
> How can I disable ^C to kill a program?
The simplest way is to make the program ignore SIGINT:
signal (SIGINT, SIG_IGN);
I suggest to read the documentation of the library function `signal'
in the library docs. Ctrl-C and Ctrl-BREAK both generate SIGINT in
DJGPP.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |