author | Rich Felker <dalias@aerifal.cx> | 2012年10月28日 21:17:45 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012年10月28日 21:17:45 -0400 |
commit | 76f28cfce59dfc499252c874f87c34567e6c86c6 (patch) | |
tree | 4a1c68348d9062d610fb27f23135fb3028b339e8 /src/process/system.c | |
parent | dd762cf6e5886ed297886a19a2e2ffd49157a786 (diff) | |
download | musl-76f28cfce59dfc499252c874f87c34567e6c86c6.tar.gz |
-rw-r--r-- | src/process/system.c | 3 |
diff --git a/src/process/system.c b/src/process/system.c index ebe207f5..0cc8b810 100644 --- a/src/process/system.c +++ b/src/process/system.c @@ -13,6 +13,7 @@ weak_alias(dummy_0, __acquire_ptc); weak_alias(dummy_0, __release_ptc); pid_t __vfork(void); +void __testcancel(void); int system(const char *cmd) { @@ -21,6 +22,8 @@ int system(const char *cmd) struct sigaction sa = { .sa_handler = SIG_IGN }, oldint, oldquit; int status = -1, i; + __testcancel(); + if (!cmd) return 1; sigaction(SIGINT, &sa, &oldint); |