Changeset ccae2f in git


Ignore:
Timestamp:
Apr 10, 2013, 4:12:24 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
58d429b7d8518126ff491afde71414bc067197ab
Parents:
55cb6bd95ed2dc1ee1fe4d8f374124dfd3836e86
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-04-10 16:12:24+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-04-10 16:14:50+02:00
Message:
fix: simplified crash handling for Singularg

from master
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/cntrlc.cc

    r55cb6b rccae2f  
    415415#ifdef unix
    416416#  ifndef __OPTIMIZE__
    417 int si_stop_stack_trace_x;
     417volatile int si_stop_stack_trace_x;
    418418#    ifdef CALL_GDB
    419419static void debug (int method)
     
    442442    {
    443443      case INTERACTIVE:
    444         fprintf (stderr, "debug_stop\n");
     444        fprintf (stderr, "\n\nquit with \"p si_stop_stack_trace_x=0\"\n\n\n");
    445445        debug_stop (args);
    446446        break;
    447       #ifndef __OPTIMIZE__
    448447      case STACK_TRACE:
    449448        fprintf (stderr, "stack_trace\n");
    450449        stack_trace (args);
    451450        break;
    452       #endif
    453451      default:
    454452        // should not be reached:
     
    473471}
    474472#    endif /* CALL_GDB */
    475 
    476 static int stack_trace_done;
    477473
    478474static void stack_trace (char *const*args)
     
    487483  char buffer[256];
    488484  char c;
    489 
    490   stack_trace_done = 0;
    491 
    492   signal (SIGCHLD, stack_trace_sigchld);
    493485
    494486  if ((pipe (in_fd) == -1) || (pipe (out_fd) == -1))
     
    564556      }
    565557    }
    566     else if (stack_trace_done)
     558    else if (si_stop_stack_trace_x==0)
    567559      break;
    568560  }
     
    573565  si_close (out_fd[1]);
    574566  m2_end(0);
    575 }
    576 
    577 static void stack_trace_sigchld (int /*signum*/)
    578 {
    579   stack_trace_done = 1;
    580567}
    581568
Note: See TracChangeset for help on using the changeset viewer.