summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index 8150ec6..1c4908f 100644
--- a/lib.c
+++ b/lib.c
@@ -2292,7 +2292,9 @@ uc_system(uc_vm *vm, size_t nargs)
goto fail;
}
- sigprocmask(SIG_SETMASK, &sigomask, NULL);
+ if (tms > 0)
+ sigprocmask(SIG_SETMASK, &sigomask, NULL);
+
free(arglist);
if (WIFEXITED(rc))
@@ -2306,7 +2308,9 @@ uc_system(uc_vm *vm, size_t nargs)
}
fail:
- sigprocmask(SIG_SETMASK, &sigomask, NULL);
+ if (tms > 0)
+ sigprocmask(SIG_SETMASK, &sigomask, NULL);
+
free(arglist);
uc_vm_raise_exception(vm, EXCEPTION_RUNTIME,