• 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: Chris Suter <email@hidden>
  • Date: Tue, 31 Mar 2009 18:02:48 +1100

Hi Jerrry,

On Tue, Mar 31, 2009 at 5:51 PM, Chris Suter <email@hidden> wrote:

> Have you considered using Mach ports for what you're trying to do?
>
> I forget all the details but I'm pretty sure you could do what you
> want with Mach ports without any great difficulty.

I just had a quick look and something like this would probably do the trick:

  if (![[NSPortNameServer systemDefaultPortNameServer] registerPort:
	[NSPort port] name:@"com.mycompany.myproduct.runonce"]]) {

	// An instance is already running...do something

  }

Kind regards,

Chris
 _______________________________________________
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

  • Follow-Ups:
    • Re: What if process crashes while holding a locked semaphore?
      • From: Jerry Krinock <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>)

  • Prev by Date: Re: What if process crashes while holding a locked semaphore?
  • 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