Revision: 8616
http://playerstage.svn.sourceforge.net/playerstage/?rev=8616&view=rev
Author: natepak
Date: 2010-04-24 00:29:34 +0000 (Sat, 24 Apr 2010)
Log Message:
-----------
Fixed semaphore locking problem with multiple users
Modified Paths:
--------------
code/gazebo/trunk/CMakeLists.txt
code/gazebo/trunk/libgazebo/Server.cc
code/gazebo/trunk/libgazebo/SimIface.cc
Modified: code/gazebo/trunk/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/CMakeLists.txt 2010-04-23 23:57:16 UTC (rev 8615)
+++ code/gazebo/trunk/CMakeLists.txt 2010-04-24 00:29:34 UTC (rev 8616)
@@ -118,10 +118,10 @@
add_subdirectory(tools)
add_subdirectory(Media)
- if (INCLUDE_PLAYER)
- add_subdirectory(player)
- add_subdirectory(player_cfgs)
- endif (INCLUDE_PLAYER)
+ #if (INCLUDE_PLAYER)
+ # add_subdirectory(player)
+ # add_subdirectory(player_cfgs)
+ #endif (INCLUDE_PLAYER)
if (INCLUDE_WEBGAZEBO)
add_subdirectory(webgazebo)
Modified: code/gazebo/trunk/libgazebo/Server.cc
===================================================================
--- code/gazebo/trunk/libgazebo/Server.cc 2010-04-23 23:57:16 UTC (rev
8615)
+++ code/gazebo/trunk/libgazebo/Server.cc 2010-04-24 00:29:34 UTC (rev
8616)
@@ -223,9 +223,12 @@
// If force is set, use the semaphore regardless of who else
// might currently be using it
if (force)
- this->semId = semget(this->semKey, 16, IPC_CREAT | S_IRWXU);
+ {
+ //this->semId = semget(this->semKey, 16, IPC_CREAT | S_IRWXU);
+ this->semId = semget(this->semKey, 16, IPC_CREAT| S_IRWXU |S_IRWXG
|S_IRWXO );
+ }
else
- this->semId = semget(this->semKey, 16, IPC_CREAT | IPC_EXCL | S_IRWXU);
+ this->semId = semget(this->semKey, 16, IPC_CREAT | IPC_EXCL | S_IRWXU |
S_IRWXG |S_IRWXO);
// Create semaphores for clients
if (this->semId < 0)
Modified: code/gazebo/trunk/libgazebo/SimIface.cc
===================================================================
--- code/gazebo/trunk/libgazebo/SimIface.cc 2010-04-23 23:57:16 UTC (rev
8615)
+++ code/gazebo/trunk/libgazebo/SimIface.cc 2010-04-24 00:29:34 UTC (rev
8616)
@@ -81,7 +81,8 @@
this->data->semKey = GZ_SEM_KEY - 10;
// Create a single semaphore
- this->data->semId = semget(this->data->semKey,1, IPC_CREAT | S_IRWXU);
+ //this->data->semId = semget(this->data->semKey,1, IPC_CREAT | S_IRWXU);
+ this->data->semId = semget(this->data->semKey, 1, IPC_CREAT| S_IRWXU
|S_IRWXG |S_IRWXO );
if (this->data->semId < 0)
printf("Error createing semaphore\n");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit