1. Replace system() with a function that responds to SIGINT. 2. Add functions to cleanup temporary files on SIGINT. 3. Fix bugs related to signal handling.

This commit is contained in:
Baruch Sterin
2011-02-01 11:13:53 -08:00
parent 624af674a0
commit b538a5fad0
9 changed files with 1016 additions and 48 deletions
+2 -1
View File
@@ -22,6 +22,7 @@
#include "mainInt.h"
#include "cmd.h"
#include "cmdInt.h"
#include "utilSignal.h"
ABC_NAMESPACE_IMPL_START
@@ -72,7 +73,7 @@ int CmdCommandLoad( Abc_Frame_t * pAbc, int argc, char ** argv )
}
Vec_StrPush( vCommand, 0 );
// run the command line
if ( system( Vec_StrArray(vCommand) ) )
if ( Util_SignalSystem( Vec_StrArray(vCommand) ) )
{
Abc_Print( -1, "The following command has returned non-zero exit status:\n" );
Abc_Print( -1, "\"%s\"\n", Vec_StrArray(vCommand) );