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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



nagakiran
New User

Sep 21, 2009, 12:14 PM

Post #1 of 2 (4161 views)
wierd problems with Win32::Semaphore Can't Post


Code
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


FishMonger
Veteran / Moderator

Sep 21, 2009, 1:24 PM

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

See my post on your duplicate question on EE.

http://www.experts-exchange.com/Programming/Languages/Scripting/Perl/Q_24749511.html

 
 


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

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