summaryrefslogtreecommitdiffstats
path: root/src/base/cmd/cmdLoad.c
diff options
context:
space:
mode:
authorBaruch Sterin <baruchs@gmail.com>2011-02-01 11:13:53 -0800
committerBaruch Sterin <baruchs@gmail.com>2011-02-01 11:13:53 -0800
commitb538a5fad096764a686a68f843f74ee36d3c7ef1 (patch)
treebdeacf8e2427a12ecb5e047bf865c44b6ffc003a /src/base/cmd/cmdLoad.c
parent624af674a0e7f1a675917afaaf371db6a5588821 (diff)
downloadabc-b538a5fad096764a686a68f843f74ee36d3c7ef1.tar.gz
abc-b538a5fad096764a686a68f843f74ee36d3c7ef1.tar.bz2
abc-b538a5fad096764a686a68f843f74ee36d3c7ef1.zip
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.
Diffstat (limited to 'src/base/cmd/cmdLoad.c')
-rw-r--r--src/base/cmd/cmdLoad.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/base/cmd/cmdLoad.c b/src/base/cmd/cmdLoad.c
index 7a83385c..8ff03282 100644
--- a/src/base/cmd/cmdLoad.c
+++ b/src/base/cmd/cmdLoad.c
@@ -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) );