Why is this dup failing under BSD?
- From: "Robert Nicholson" <robert.nicholson@xxxxxxxxx>
- Date: 30 Dec 2006 10:05:01 -0800
I've been doing the following in order to use flock ie. covert a file
descriptor to a File Handle
my %hash;
my $hash = tie (%hash, 'DB_File', $listsDb, O_RDONLY|O_CREAT, 0644)
or
die "Cannot open $listsDb\n";
my $fd = $hash->fd;
open(DB_FH, "+<&=$fd") or die "dup $!";
flock (DB_FH, LOCK_SH) or die "flock: $!";
under BSD I get an error when I do this.
Can anybody tell me why?
.
- Follow-Ups:
- Re: Why is this dup failing under BSD?
- From: John W. Krahn
- Re: Why is this dup failing under BSD?
- Prev by Date: Re: Problem with subroutine Variable "$file" will not stay shared at..
- Next by Date: Re: Why is this dup failing under BSD?
- Previous by thread: Problem with subroutine Variable "$file" will not stay shared at..
- Next by thread: Re: Why is this dup failing under BSD?
- Index(es):
Relevant Pages
|