Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Dec 2009 09:15:45 +0800
From:      David Xu <davidxu@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: first patch for process-shared semaphore
Message-ID:  <4B341241.9090208@freebsd.org>
In-Reply-To: <200912240755.11841.jhb@freebsd.org>
References:  <4B317741.8080004@freebsd.org> <200912230936.35998.jhb@freebsd.org> <4B32C1DC.9080308@freebsd.org> <200912240755.11841.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:

> Yes, Solaris uses files in /tmp and Darwin uses special file descriptors 
> similar to what we do.  However, you will have to restrict the namespace if 
> you go the /tmp route to be safe I think similar to what Solaris does (no path 
> separators, just simple names like 'foo'). 

I will only allow names like /XXX, make sure to be compatible with
current implementation.

> You might also want to use the 
> same naming convention as Solaris if you go the /tmp route (I think they use a 
> path other than .semaphore under /tmp IIRC).

What is their name convention? The patch just create all semaphore files
in directory /tmp/.semaphore and semaphore name is not changed.

>  Not sure if we want to do 
> anything special to ensure that those particular set of files in /tmp always 
> get purged on reboot to avoid weird bugs with semaphores unexpectedly 
> persisting across reboots.
> 

Yes, this is an issue, I would like to purge it on reboot.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B341241.9090208>