Changeset a056b96 in tol


Ignore:
Timestamp:
Mar 13, 2012, 1:22:24 PM (15 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
7cf1759
Parents:
589877d
Message:

refs #1430, dos Ctrl-C sucesivos emitidos dentro del intervalo de un segundo provoca la salida de la aplicación, el primer Ctrl-C interrumpe la evaluación.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@4345 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/init.cpp

    r589877d ra056b96  
    6969#include <contrib/cint/tolCint.h>
    7070
     71#include <time.h>
     72
    7173
    7274#ifdef _DEBUG
    … …  
    225227//--------------------------------------------------------------------
    226228{
    227   Error("SIGNAL: Interactive attention signal; on interactive systems this is usually generated by typing some break-in key at the terminal. (Interrupt.)");
    228   //Error_UnexpectedTolEnd();
    229   StopFlagOn();
    230   //exit(sig);
     229  static time_t *tm0 = NULL;
     230  time_t tm1 = time( NULL );
     231 
     232  if ( tm0 && (tm1 - *tm0) < 1 ) {
     233    Error("SIGNAL: Interactive attention signal; on interactive systems this is usually generated by typing some break-in key at the terminal. (Exit application)");
     234    exit(sig);
     235  } else {
     236    Error("SIGNAL: Interactive attention signal; on interactive systems this is usually generated by typing some break-in key at the terminal. (Stop evaluation)");
     237    //Error_UnexpectedTolEnd();
     238    StopFlagOn();
     239    if ( !tm0 ) {
     240      tm0 = new time_t;
     241    }
     242    time( tm0 );
     243  }
    231244};
    232245
Note: See TracChangeset for help on using the changeset viewer.