
nagakiran
New User
Sep 21, 2009, 12:14 PM
Post #1 of 2
(6357 views)
|
wierd problems with Win32::Semaphore
|
Can't Post
|
|
use Win32::Semaphore; $sem = Win32::Semaphore->new(0, 1,"reliance2692") or print "Can't create semaphore\n"; $sem = Win32::Semaphore->open("reliance2692") or print "Can't open semaphore\n"; print "Semaphore:" . $sem . "\n"; By running the above program, I am getting the following output Can't create semaphore Can't open semaphore The output shows that its failed to create a semaphore and even failed to open semaphore. creating a semaphore might have failed if a semaphore already exists with the given name. I don't understand why opening a semaphore failed. Can some clarify the scenario where both creating semaphore & opening semaphore fails. Are there any permissions with semaphore such that a new semaphore created can be accessed only by certain processes?? Thanks in advance, Naga Kiran
|