How do I stop sem_open() failing with ENOSYS?

后端 未结 5 1530
不思量自难忘°
不思量自难忘° 2020-12-19 18:03

I have two Slackware Linux systems on which the POSIX semaphore sem_open() call fails with errno set to 38. Sample code to reproduce below (the code works fine

5条回答
  •  温柔的废话
    2020-12-19 18:44

    Another way to share a semaphore across processes is to use SystemV semaphores.

    These do work even where shared POSIX semaphores don't (at least on the systems described above.).

    See http://www.linuxdevcenter.com/pub/a/linux/2007/05/24/semaphores-in-linux.html for examples of the two types of semaphore use.

提交回复
热议问题