LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Shared semaphore usage problem (http://www.linuxquestions.org/questions/linux-software-2/shared-semaphore-usage-problem-745555/)

msherbiny 08-06-2009 08:57 AM

Shared semaphore usage problem
 
Hi,

I am trying to make IPC between two processes through shared memory and shared semaphores.

A parent process is run which forks another child process. When the child process tries to use a shared semaphore by calling semget(), semop(), ... an error occurs. "errno" value is ESPIPE or 29. This error is not listed with the expected errors according to semget() or semop() man pages.

It is worth nothing that introducing a sleep statement in parent process after each semaphore operation causes the error to vanish. Of course this delay is not accepted in normal operation of the application.

Thanks for the help in advance.


All times are GMT -5. The time now is 06:52 PM.