Skip to content

Commit

Permalink
Defer exit after sending the reply
Browse files Browse the repository at this point in the history
  • Loading branch information
IngmarStein committed Sep 24, 2012
1 parent d56ebcb commit fe3b40d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Monolingual/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,10 @@ static void peer_event_handler(xpc_connection_t peer, xpc_object_t event) {
xpc_connection_send_message(peer, replyMessage);
xpc_release(replyMessage);

// exit after one job
exit(EXIT_SUCCESS);
dispatch_async(dispatch_get_main_queue(), ^ __attribute__((noreturn)) {
// exit after one job
exit(EXIT_SUCCESS);
});
}
}

Expand Down

0 comments on commit fe3b40d

Please sign in to comment.