X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fprocess%2Fsystem.c;h=ebe207f597f13edd3bba746115260b6894ce20c4;hp=c8f260083ecb827a0c24dcdf5fe693e9485cb4e8;hb=599f97360389911c293e0ca4c5eb49e007377fba;hpb=44eb4d8b9b7b3b539bcd4e311e9d7c8e2acf8d80 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;