I think , I found the solution, so just for the record
(so that others will find it using Google):
Launch the app in the debugger on the command line :
lldb /private/tmp/Build/Products/Debug/MyApp.app
In lldb's command line:
process handle -p true -s false -n true // otherwise lldb
That’s a great tip Jens. Gabriel, if you build your app with different
dev/release schemes, you could detect your build scheme and then execute the
desired process based on if you’re able to debug or not.
Just expose the environment variable for $CONFIGURATION in an info.plist file,
read it
Xcode intercepts signals in the process being debugged (for good reason).
You can ignore specific signals in Xcode (i.e. pass them through to the process
being debugged) by breaking into the debugger, then enter in the Xcode console
part (example for SIGUSR1):
process handle SIGUSR1 -s
I am setting up a signal handler in my app like this:
void *e = signal( SIGUSR1, signal_handler );
if ( e == SIG_ERR )
...
It works (i can 'kill -30 '), BUT ONLY, if I run my app outside of Xcode.
When I launch it from Xcode, and I send a SIGUSR1 to my app, it always breaks
at