[ace-users] [autotools] POSIX named semaphore detection fix
jwillemsen at remedy.nl
Fri Aug 10 04:48:37 CDT 2007
A short question, wouldn't it be the most safest to also start the test
program with a sem_unlink? When them something has left from a previous run
we do a cleanup first.
"Thomas Girard" <thomas.g.girard at free.fr> wrote in message
news:<mailman.1767.1186687126.5286.ace-users at mail.cse.wustl.edu>...
> Le mardi 24 juillet 2007 à 11:10 -0400, Caleb Epstein a écrit :
> > I recently rebuilt ACE using the configure script and found that the
> > resulting config.h had (mistakenly) decided that ACE_OS::fast_memcpy
> > was faster than ::memcpy (it isn't, by a factor of about 3) and that
> > my system had no SysV named semaphore operations (it does).
> Assuming you were referring to POSIX named semaphores, I have been able
> to recreate the described error by running configure twice.
> Indeed in the sem_open test, the created semaphore is not unlinked,
> hence the next time the test is run the call to:
> sem_open ("ace_semaphore_foo", O_CREAT | O_EXCL, 0600, 1);
> fails because the named semaphore already exist.
> The attached patch unlinks the created semaphore if everything goes
> fine. It can be applied to the 5.5.10 version or the SVN repo (as of
More information about the Ace-users