[Xenomai] Posix named semaphore used by two separate applications

Jan Kiszka jan.kiszka at siemens.com
Thu May 24 12:19:10 CEST 2018

On 2018-05-24 10:50, Paal Tamas wrote:
> I would like to use the same named semaphore in two separate Xenomai binaries. I am using the Posix skin. It does not work as I am expecting it. 
> The first instance of my test application creates a named semaphore. It goes to sleep after that. The second instance of the same applications starts than. It realizes that the semaphore with the name already exists, so it opens it. The sem_open() returns a valid (like) pointer. After that all semaphore functions in this second application return EINVAL (22) (Invalid argument). Both the sem_wait() and the sem_close() function behave this way.
> The same procedure worked fine in (the previous version I used). I tried 3.0.5 and the latest git repository too. The same bad behavior there.

Did you configure userspace with --enable-pshared?


Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

More information about the Xenomai mailing list