Houdini Engine HARS ready-handle C++ posix semaphore basics

   1073   2   0
User Avatar
Member
83 posts
Joined: 7月 2005
Offline
HARS has a "ready-handle" option; in the docs it says:
Name of the POSIX named semaphore that will be posted when the server is ready

so, I have read up on POSIX named semaphores, and I'm a bit fuzzy on how to use this option.
I can use sem_wait(semaphore) if I have the semaphore, but, I do not see how to wait given only the name of the semaphore?
how is this feature supposed to be used?
User Avatar
Member
83 posts
Joined: 7月 2005
Offline
so, I think I made a bit of progress, it seems I open the semaphore and pass it's name:

sem_t *sem = sem_open("/foo", O_CREAT, S_IRWXU, 0);
system("HARS -a -n \"/tmp/houdini_tmp/hapiHARS_foo\" -r \"/foo\" &");
sem_wait(sem)


I *think* this is correct?
User Avatar
Member
1 posts
Joined: 10月 2014
Offline
@ivan did you ever get this to work? I've basically run into the same question that you posted.
  • Quick Links