• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Xcode interferes with signal handler (was: Sending SIGUSR1 to a process)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Xcode interferes with signal handler (was: Sending SIGUSR1 to a process)
  • From: Gabriel Zachmann via Cocoa-dev <email@hidden>
  • Date: Tue, 30 Jan 2024 20:31:45 +0100

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 <pid>'), 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 mach_msg2_trap.
Obviously, this is a bit tedious for developing, since now I always have to go
through Product / Archive / Distribute ...

Any ideas, how I can prevent this from happening?

And it's unclear to me what's going on. Can Xcode really prevent signal(3) from
installing a signal handler?
Or does a kill on the command line deliver the signal to several processes, one
of them, maybe, an ancillary process from Xcode?


Best regards, Gabriel



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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Xcode interferes with signal handler (was: Sending SIGUSR1 to a process)
      • From: Gabriel Zachmann via Cocoa-dev <email@hidden>
    • Re: Xcode interferes with signal handler
      • From: Pascal Bourguignon via Cocoa-dev <email@hidden>
References: 
 >Sending SIGUSR1 to a process (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)
 >Re: Sending SIGUSR1 to a process (From: Saagar Jha via Cocoa-dev <email@hidden>)

  • Prev by Date: Figma UI/UX?
  • Next by Date: Re: Xcode interferes with signal handler
  • Previous by thread: Re: Sending SIGUSR1 to a process
  • Next by thread: Re: Xcode interferes with signal handler
  • Index(es):
    • Date
    • Thread