4 #include <dispatch/dispatch.h>
7 __attribute__((section("__DATA,__allow_alt_plat"))) uint64_t dummy
;
9 int main(int argc
, const char* argv
[], const char* envp
[], const char* apple
[]) {
10 dispatch_source_t exitSource
= dispatch_source_create(DISPATCH_SOURCE_TYPE_PROC
, getppid(),
11 DISPATCH_PROC_EXIT
, dispatch_get_main_queue());
12 dispatch_source_set_event_handler(exitSource
, ^{
15 dispatch_resume(exitSource
);
16 dispatch_async(dispatch_get_main_queue(), ^{
17 kill(getppid(), SIGUSR1
);