• 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
Re: Objective-C in signal handlers (was Re: Inter process communication question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C in signal handlers (was Re: Inter process communication question)


  • Subject: Re: Objective-C in signal handlers (was Re: Inter process communication question)
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 5 Feb 2003 18:44:47 -0800

On Wednesday, February 5, 2003, at 04:24 PM, Greg Parker wrote:

In general, you can't do anything inside a signal handler other than
write() to a pipe or set a global variable that some other thread is
watching. exit() is definitely unsafe because it might call atexit()
handlers; use _exit() instead. unlink() might be safe if it's just a
single system call, but I'm not sure about that.

I am given to understand that sending a Mach message via mach_msg() is also safe. There was a recent post on one or another mailing list showing an example of sending a Mach message in a signal handler and catching it with a run loop source. Writing to a socket or pipe could also serve the same purpose.

Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Objective-C in signal handlers (was Re: Inter process communication question)
  • Next by Date: Re: Missing inactive and disabled states on some controls
  • Previous by thread: Re: Objective-C in signal handlers (was Re: Inter process communication question)
  • Next by thread: default Find Panel?
  • Index(es):
    • Date
    • Thread