• 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: What if process crashes while holding a locked semaphore?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What if process crashes while holding a locked semaphore?


  • Subject: Re: What if process crashes while holding a locked semaphore?
  • From: Jerry Krinock <email@hidden>
  • Date: Tue, 31 Mar 2009 07:43:29 -0700


On 2009 Mar 31, at 00:02, Chris Suter wrote:

... you could do what you want with Mach ports without any great difficulty.

Very good, Chris. I'm an NSPortNameServer fan now. Your little code works great -- the only change is that I needed to retain the NSPort object, and then when work is done, send it an -[NSPort invalidate].


The system clears the named port when I crash the single process which registered it. Yay! The only return value I need to deal with is the one that tells me whether or not the named port is available. There are no stupid errno`s to verbalize, no stupid descriptors, no stupid #includes, no stupid MAX_VALUE`s. 130 lines of code are gone.

Thanks to everyone for the help.

If anyone who knows about semaphores thinks so, I'll file that bug on the semaphores. Maybe the behavior is expected. Let me know.

Jerry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: What if process crashes while holding a locked semaphore? (From: David Gatwood <email@hidden>)
 >Re: What if process crashes while holding a locked semaphore? (From: Jerry Krinock <email@hidden>)
 >Re: What if process crashes while holding a locked semaphore? (From: Chris Suter <email@hidden>)
 >Re: What if process crashes while holding a locked semaphore? (From: Chris Suter <email@hidden>)

  • Prev by Date: Re: debuggging a recurring system freeze (syslog redir, ktrace?)
  • Next by Date: Re: What if process crashes while holding a locked semaphore?
  • Previous by thread: Re: What if process crashes while holding a locked semaphore?
  • Next by thread: Re: What if process crashes while holding a locked semaphore?
  • Index(es):
    • Date
    • Thread