Thread shared lock Frage (8 answers)
Opened by Kuerbis at 2015-05-12 10:09

Kuerbis
 2015-05-12 10:09
#181012 #181012
User since
2011-03-20
947 Artikel
BenutzerIn
[default_avatar]
Hallo!

Ist hier das SEEK_SET überflüssig/falsch?

Code (perl): (dl )
1
2
3
4
5
6
7
use Fcntl qw( LOCK_SH SEEK_SET );

open my $fh, '<', $file die $!;
flock $fh, LOCK_SH or die $!;
seek  $fh, 0, SEEK_SET or die $!;
my $d = do { local $/; <$fh> };
close $fh;

Last edited: 2015-05-15 19:05:47 +0200 (CEST)

View full thread shared lock Frage