From a0a269937aad43150c92be295e7340d024c7ae0b Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Sun, 9 Feb 2003 18:19:17 +0000 Subject: [PATCH] * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2233 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 4 ++++ src/SDCCmain.c | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca3fe440..97f2066d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-02-09 Bernhard Held + + * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS + 2003-02-09 Bernhard Held * src/SDCCmain.c: signal handling is switched off by --debug diff --git a/src/SDCCmain.c b/src/SDCCmain.c index caf8ad50..5dbd298a 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -1784,6 +1784,16 @@ main (int argc, char **argv, char **envp) /* install atexit handler */ atexit(rm_tmpfiles); + /* install signal handler; + it's only purpuse is to call exit() to remove temp files */ + if (!getenv("SDCC_LEAVE_SIGNALS")) + { + signal (SIGABRT, sig_handler); + signal (SIGTERM, sig_handler); + signal (SIGINT , sig_handler); + signal (SIGSEGV, sig_handler); + } + /* Before parsing the command line options, do a * search for the port and processor and initialize * them if they're found. (We can't gurantee that these @@ -1818,16 +1828,6 @@ main (int argc, char **argv, char **envp) #endif parseCmdLine (argc, argv); - /* install signal handler; - it's only purpuse is to call exit() to remove temp files */ - if (!options.debug) - { - signal (SIGABRT, sig_handler); - signal (SIGTERM, sig_handler); - signal (SIGINT , sig_handler); - signal (SIGSEGV, sig_handler); - } - /* if no input then printUsage & exit */ if ((!options.c1mode && !fullSrcFileName && !nrelFiles) || (options.c1mode && !fullSrcFileName)) -- 2.30.2