That will call to the following code:

  struct sembuf operations[1];

  operations[0].sem_num = this->clientId;
  operations[0].sem_op = -1;
  operations[0].sem_flg = SEM_UNDO;

  if (semop(this->semId, operations, 1) < 0)
    std::ostringstream stream;
    stream << "error on semaphore wait [" << strerror(errno) << "]";

So it will not return anything.  Just block waiting for the semaphore.
If some error happened it will throw an exception.

On Dec 21, 2007 7:03 PM, Willi Richert <> wrote:

In class Client of gazebo.h (svn) we have a small error: Shall Wait return
something or not?

 /// \brief Wait for new data to be posted (blocking mode).
 /// \returns Returns 0 on success, -1 on error.
 public: void Wait();

Merry christmas,

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
Playerstage-gazebo mailing list

Jordi Polo Carres
Natural language processing laboratory