3 Dec
2010
3 Dec
'10
10:47 a.m.
It turns out the man page of dispatch_queue_create() specifically lists the pthread_* calls which are compatible with GCD. pthread_sigmask() is one of them (the thread must be restored to its original state before returning though).
I thought I remembered seeing some docs on that topic, but couldn't find them earlier. Thanks.
It seems the other solution is to call pthread_sigmask() between my fork() and exec() to unblock the SIGINT signal.
Yep. I believe it's been mentioned on darwin-dev that posix_spawn is now the recommended spawning API. (Though it has its shortcomings, some of which can't be worked around and require fork/exec, such as closing all file descriptors in the child. rdar://7724566 and rdar://8390960)