(See attached file: lcctestsem.c)
problem about SEMAPHORE at cygwin 1.5.7 cygwin 1.5.7 cygserver as ipc server a process has gotten semaphore using SEM_UNDO, when the process aborts, it should release corresponding semaphore at Linux.But at Cygwin 1.5.7,1.5.4, 1.3.22, I cannot prove it. is it a bug to cygwin ? thank you the following is my program's result. [EMAIL PROTECTED] ~ $ ./a.exe ( the first running) before Get semaphore exclusively... semval[0] = 8 after Get semaphore ... semval[0] = 7 before release semaphore exclusively... semval[0] = 7 before release semaphore exclusively... semval[0] = 8 [EMAIL PROTECTED] ~ $ ./a.exe ( the second running, gets semaphore and releases semaphore successfully) Test semaphore has existed. Get test semaphore... semval[0] = 8 Get test semaphore successfully. before Get semaphore exclusively... semval[0] = 8 after Get semaphore ... semval[0] = 7 before release semaphore exclusively... semval[0] = 7 before release semaphore exclusively... semval[0] = 8 [EMAIL PROTECTED] ~ $ ./a.exe ( the third running, gets semaphore successfully,but fails to release semaphore ) Test semaphore has existed. Get test semaphore... semval[0] = 8 Get test semaphore successfully. before Get semaphore exclusively... semval[0] = 8 after Get semaphore ... semval[0] = 7 before release semaphore exclusively... [EMAIL PROTECTED] ~ $ ./a.exe ( the fourth running, proves that the third running didnot release semephore when aborting , a bug ????) Test semaphore has existed. Get test semaphore... semval[0] = 7 Get test semaphore successfully. before Get semaphore exclusively... semval[0] = 7 after Get semaphore ... semval[0] = 6 before release semaphore exclusively... semval[0] = 6 before release semaphore exclusively... semval[0] = 7 [EMAIL PROTECTED] ~ $ */
lcctestsem.c
Description: Binary data
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/