summaryrefslogtreecommitdiff
path: root/src/process/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process/system.c')
-rw-r--r--src/process/system.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/process/system.c b/src/process/system.c
index c8f26008..ebe207f5 100644
--- a/src/process/system.c
+++ b/src/process/system.c
@@ -29,7 +29,8 @@ int system(const char *cmd)
__acquire_ptc();
pid = __vfork();
- __release_ptc();
+
+ if (pid) __release_ptc();
if (pid > 0) {
sigset_t new = old;