Re: Xcode interferes with signal handler

2024-01-31 Thread Gabriel Zachmann via Cocoa-dev
Sorry, Jens and Pascal! I have received your messages just now. You were right, as I have found out a while later kind of the hard way ... So, thanks again! Best regards, Gabriel smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev

Re: Xcode interferes with signal handler (was: Sending SIGUSR1 to a process)

2024-01-31 Thread Gabriel Zachmann via Cocoa-dev
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 will

Re: Xcode interferes with signal handler

2024-01-31 Thread Alex Zavatone via Cocoa-dev
Hi Gabriel. Happy that you’re getting some progress. Did Jens’s reply not explain why it would be interfered with when running in the debugger? > On Jan 31, 2024, at 10:33 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > I have investigated a bit further. > > When I launch my app from lldb (

Re: Xcode interferes with signal handler

2024-01-31 Thread Gabriel Zachmann via Cocoa-dev
I have investigated a bit further. When I launch my app from lldb (on the command line), it still stops in mach_msg2_trap when I send a SIGUSR1 to my app. But at least, I get a more meaningful stack trace: * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGUSR1 * frame #0: 0

Re: Xcode interferes with signal handler (was: Sending SIGUSR1 to a process)

2024-01-31 Thread Alex Zavatone via Cocoa-dev
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