www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/07/16:41:10

Xref: news2.mv.net comp.os.msdos.djgpp:3532
From: barry AT rtp DOT avanticorp DOT com (Barry A Giffel)
Newsgroups: comp.os.msdos.djgpp
Subject: ANSI C signal definitions
Date: 07 May 1996 14:53:27 -0400
Organization: Avant! Corp.
Lines: 22
Sender: barry AT baloo DOT rtp DOT avanticorp DOT com
Message-ID: <yeive85n88.fsf@baloo.rtp.avanticorp.com>
NNTP-Posting-Host: baloo.rtp.avanticorp.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

After reading an ANSI C programming book, it appears that SIGINT is
ANSI C (correct me if I'm wrong, I don't have the specs). This is
confirmed by looking at signal.h on a few other platform (HP-UX for
example). However, the signal.h from the djgpp v2.0 gcc port does not
define SIGINT if the -ansi command line option is given to gcc.

My first question is, should SIGINT be defined for ANSI or not?

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.

Thanks for any and all help...


-- 
  Barry A. Giffel
  Software Engineer,  Avant! Corp.
  Work Phone: (919) 941-6645,  Fax: (919) 941-6700
  Email: Barry_Giffel AT avanticorp DOT com

- Raw text -


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