From: Patricia Hinman <[EMAIL PROTECTED]>
> I just wrote a script that reads yahoo directories,
> and writes to a temp txt file the portion of
> direcetories it's currently working with. Then copies
> that temp file to a completed log file, and grabs the
> next subcatagory to wo
On Wednesday, July 17, 2002, at 07:04 , George Schlossnagle wrote:
>>> The main problem appears to be that instead of taking a different branch
>>> if open() or flock() fails you continue on as if they had succeeded.
>
> flock($fh,LOCK_EX ) is a blocking call, so it won't return until the lock
From: George Schlossnagle <[EMAIL PROTECTED]>
> >> The main problem appears to be that instead of taking a different
> >> branch if open() or flock() fails you continue on as if they had
> >> succeeded.
>
> flock($fh,LOCK_EX ) is a blocking call, so it won't return until the
> l
>> The main problem appears to be that instead of taking a different
>> branch
>> if open() or flock() fails you continue on as if they had succeeded.
flock($fh,LOCK_EX ) is a blocking call, so it won't return until the
lock is available.
// George Schlossnagle
// Principal Consultant
// Omni
"John W. Krahn" wrote:
>
> Jeff wrote:
> >
> > From: John W. Krahn [mailto:[EMAIL PROTECTED]]
> > >
> > > Jeff wrote:
> > > >
> > > > I'm use flat files to manage a list containing approx 25,000 records. For
> > > > updates, I write to a temp file then unlink main and rename temp file to
> > > >
Jeff wrote:
>
> From: John W. Krahn [mailto:[EMAIL PROTECTED]]
> >
> > Jeff wrote:
> > >
> > > I'm use flat files to manage a list containing approx 25,000 records. For
> > > updates, I write to a temp file then unlink main and rename temp file to
> > > main. I use flock for both temp and main
_);
> next unless $name eq $update;
> $new_location = "palm_bay";
> $_ = join( "|", $name, $team, $new_location);
> }
> continue {
> print OUT $_ or print "Error writing $tmp_db: $!\n";
> }
> close IN;
> close OUT;
>
t;;
}
-----Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 8:11 PM
To: [EMAIL PROTECTED]
Subject: Re: Flat File Db
Jeff wrote:
>
> I'm use flat files to manage a list containing approx 25,000 records. For
> updates, I write to a temp
Jeff wrote:
>
> I'm use flat files to manage a list containing approx 25,000 records. For
> updates, I write to a temp file then unlink main and rename temp file to
> main. I use flock for both temp and main files during update. My main file
> gets blown away on occasions. What gives? I can'