* src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 9 Feb 2003 18:19:17 +0000 (18:19 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 9 Feb 2003 18:19:17 +0000 (18:19 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2233 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCmain.c

index ca3fe44082ad740035355d09e4fea828637ade44..97f2066d92221743890f194d19447823cb204b1c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-02-09  Bernhard Held <bernhard@bernhardheld.de>
+
+       * src/SDCCmain.c: signal handling is switched off by SDCC_LEAVE_SIGNALS
+
 2003-02-09  Bernhard Held <bernhard@bernhardheld.de>
 
        * src/SDCCmain.c: signal handling is switched off by --debug
index caf8ad502e86b64938231716f51e4a4feccf0f4c..5dbd298a654027a699cd8f874a214bb5e8a377fd 100644 (file)
@@ -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))