Semaphore Lock Failed Error

Meenakshi Pant meenakshi.pant28@gmail.com
Wed Mar 9 08:32:00 GMT 2016


Our program is failing in creating and acquiring lock on the
semaphore. Created a test program 'semtest.c'. It is creating the
semaphore using the program semaphore.c. Compiled and executed using
the latest CYGWIN- 2.4.1. It is failing at line

if  ((semval = semctl(*id, 1, GETVAL, semctl_arg)) < 0 )

with error no 22.

Code for semtest.c and semaphore.c are attached here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: semtest.c
Type: text/x-csrc
Size: 1895 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160309/b552a831/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: semaphore.c
Type: text/x-csrc
Size: 10387 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160309/b552a831/attachment-0001.bin>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list