>
> Yes, this should work. The only changes I know of is that you can’t signal 
> some Apple processes these days if System Integrity Protection is engaged.

I have tried it like the following, but to no avail:


void signal_handler( int sig )
{
    logMessage( LogClient, [NSString stringWithFormat: @"signal %d caught", 
sig], NO );
}
    // install signal handler

In the init method of my app I have:

    void *e = signal( SIGUSR1, signal_handler );
    if ( e == SIG_ERR )
    {
        char * errmesg = strerror( errno );
        [self logMessage: [NSString stringWithFormat: @"Installing signal 
handler failed: %s", errmesg] asError: YES];
    }



When I run my app (from Xcode), I don't get any error message, but sending a 
SIGUSR1 (using 'kill' on the command line) just makes it stop in mach_msg2_trap.
Stack trace:
  start, main, NSApplicationMain, mach_msg2_trap.
My signal_handler won't get called.




Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to