CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Win32 Programming Help:
wierd problems with Win32::Semaphore


New User

Sep 21, 2009, 12:14 PM

Post #1 of 2 (7097 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

Veteran / Moderator

Sep 21, 2009, 1:24 PM

Post #2 of 2 (7088 views)
Re: [nagakiran] wierd problems with Win32::Semaphore [In reply to] Can't Post

See my post on your duplicate question on EE.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives