Displaying 1 result from an estimated 1 matches for "anythingin".
Did you mean:
anything
2006 Jan 11
0
how to force Samba respects file locking?
...se type the file that I should lock for
$sec: ';
my $file = <STDIN>;
chomp $file;
sysopen( FH, $file, O_RDWR ) or die "Cannot edit
$file: $!\n";
flock( FH, LOCK_EX ) or die "Cannot lock $file: $!\n";
print 'Ok, holding the file for $sec seconds. I will
not change anythingin the file', "\n";
sleep $sec;
close(FH);
print "Finished\n";
-- code --
Thanks in advance.
Regards,
Alceu Rodrigues de Freitas Junior
--------------------------------------
glasswalk3r@yahoo.com.br
http://www.imortais.cjb.net
-----------------------------------------...