delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/09/12:02:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 9 Dec 2004 18:03:59 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: [Fwd: [gp AT familiehaase DOT de: sem_* functions in cygwin]]
Message-ID: <20041209170359.GE22056@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
References: <20041209164442 DOT GA25246 AT cygbert DOT vinschen DOT de> <0I8G00F7VS4BRS AT pmismtp01 DOT mcilink DOT com>
Mime-Version: 1.0
In-Reply-To: <0I8G00F7VS4BRS@pmismtp01.mcilink.com>
User-Agent: Mutt/1.4.2i

On Dec  9 09:50, Mark Paulus wrote:
> So, does that mean that if process 1 opens a semaphore,
> process 2 also grabs it, then process 1 unlinks it, and then
> "reconnects" to it, that process 1 and process 2 do not have
> and cannot have the same semaphore anymore, even though
> they are using the same IPC_KEY?
> 
> (Or am I way confused/off base here)?

Only partially.  IPC_KEYs have nothing to do with it since we're talking
about *POSIX* semaphores, not *SYSV* semaphores.

Otherwise you're right.  After some process has called sem_unlink(), any
subsequent call to sem_open with the same sempahore name connects to a new
semaphore.


Corinna

> 
>   On Thu, 09 Dec 2004 17:44:42 +0100, Corinna Vinschen wrote:
> 
> >[Catching up on some older mails]
> 
> >> ----- Forwarded message from "Gerrit P. Haase" -----
> >> From: "Gerrit P. Haase" 
> >> To: cygwin ML
> >> Subject: sem_* functions in cygwin
> >> Date: Sun, 21 Nov 2004 22:48:20 +0100
> >> 
> >> Hi,
> >> 
> >> nearly all sem_* functions are available, but sem_unlock is missing,
> >> was there a problem implementing sem_unlock() or was it just missed
> >> by accident?
> >> 
> >> 
> >> Gerrit
> >> ----- End forwarded message -----
> 
> >I guess you're asking about sem_unlink().  It's not implemented so far
> >since named POSIX semaphores are implemented using named Windows semaphores. 
> >The SUSv3 description contains a pretty unfortunate implementation detail:
> 
> >  Calls to sem_open() to recreate or reconnect to the semaphore refer
> >  to a new semaphore after sem_unlink() is called.
> 
> >There's no way I know of, which allows to implement this using named
> >Windows semaphores.  At least not without adding a lot of annoying
> >bookkeeping overhead, possibly involving cygserver.
> 
> 
> >Corinna
> 
> >--
> >Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> >Problem reports:       http://cygwin.com/problems.html
> >Documentation:         http://cygwin.com/docs.html
> >FAQ:                   http://cygwin.com/faq/
> 
> 
> 
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019