cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/15/01:18:19

Message-ID: <3625936E.B61DF19B@post.comstar.ru>
Date: Thu, 15 Oct 1998 09:17:18 +0300
From: Dim Zegebart <zager AT post DOT comstar DOT ru>
Organization: Comstar Ltd.
X-Mailer: Mozilla 4.05 [en] (WinNT; I)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: How to implement a CTRL-C handler?
References: <3625408b DOT 0 AT nsuxnews>
Reply-To: djgpp AT delorie DOT com


Goh Yong Kwang wrote:

> My program always terminate when the user presses CTRL-C. Files go unsaved, data are lost and sometimes corrupted because it was terminated halfway through writing files and so on.
>
> I think there's a way to handle this situation whereby the program maintains control after CTRL-C is pressed.
>
> >From what I know, I think I've to implement some sort of CTRL-C handler/function/routine but I've totally no idea how to do it. Can anyone help me with this?

Create you handler function for SIGINT and install it using signal()
See  __djgpp_set_ctr_c() and signal().

--
Dim Zegebart
Moscow, Russia


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019