diff options
author | comex | 2015-07-17 18:00:26 -0400 |
---|---|---|
committer | comex | 2015-07-17 18:00:26 -0400 |
commit | 30348d5f7e4e4a1b035bc8ebbfa6b1e789a79375 (patch) | |
tree | 8ca2c3459ca49803e787266dcfe340c52ec54a69 /darwin-bootstrap/posixspawn-hook.c | |
parent | show the name of slow commands (diff) | |
download | substitute-30348d5f7e4e4a1b035bc8ebbfa6b1e789a79375.tar.gz |
race condition fix
Diffstat (limited to 'darwin-bootstrap/posixspawn-hook.c')
-rw-r--r-- | darwin-bootstrap/posixspawn-hook.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/darwin-bootstrap/posixspawn-hook.c b/darwin-bootstrap/posixspawn-hook.c index 47e792c..9826170 100644 --- a/darwin-bootstrap/posixspawn-hook.c +++ b/darwin-bootstrap/posixspawn-hook.c @@ -489,7 +489,6 @@ static int hook_xpc_pipe_try_receive(mach_port_t port_set, xxpc_object_t *reques pthread_mutex_lock(&g_state_lock); xxpc_object_t fate = xxpc_dictionary_get_value(g_bundleid_to_fate, bundleid); - pthread_mutex_unlock(&g_state_lock); if (fate) { if (IB_VERBOSE) { char *desc = xxpc_copy_description(fate); @@ -501,6 +500,7 @@ static int hook_xpc_pipe_try_receive(mach_port_t port_set, xxpc_object_t *reques if (IB_VERBOSE) ib_log("your (%s) fate is unavailable", bundleid); } + pthread_mutex_unlock(&g_state_lock); xxpc_dictionary_set_value(reply, "out", out); xxpc_release(out); } else { |