Why not work POSIX::RT:Semaphore
From: Dima (_asr__at_inbox.ru)
Date: 03/24/05
- Next message: soup_or_power_at_yahoo.com: "[BEGINNER]Storable::dclone question"
- Previous message: gfs X: "Re: Array to strings?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 Mar 2005 05:45:44 -0800
This is my simple code
#!/usr/local/bin/perl
use threads;
use threads::shared;
use POSIX::RT::Semaphore;
$sem = POSIX::RT::Semaphore->init(0, 0);
my $pid = fork;
if ( $pid == 0 )
{
$sem->wait;
print "CODE2\n";
exit;
}
print "CODE1\n";
$sem->post;
Why I see only CODE1???
Why after post in parent process semaphore value in child process was't changed?
- Next message: soup_or_power_at_yahoo.com: "[BEGINNER]Storable::dclone question"
- Previous message: gfs X: "Re: Array to strings?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]