Notes:
use Proc::Background; my $proc = Proc::Background->new( "perl -MFcntl=:flock -e 'open FH, \">>\", \"$filename\";exit flock + FH, LOCK_E X|LOCK_NB", ); my $rc = $proc->wait >> 8; ok( !$rc, "Cannot flock $logfile" );
In reply to Testing if your code successfully flocked by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |