in reply to Is the file there?
In cgi scripts, you need to worry about more than one instance running at a time. That requires locking, as well as the exclusivity you want:
Update: Explicitly added Fcntl to get the symbols defined. Ahbeyra, please say what error messages you get, maybe post some more code.my $path = "$dir/$name"; my $fh; use Fcntl; sysopen ( $fh, $path, O_WRONLY|O_EXCL|O_CREAT|O_EXLOCK ) or die $!;
Update2: Added O_CREAT flag. Props to jeroenes for spotting.
After Compline,
Zaxo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Is the file there?
by Ahbeyra (Monk) on Oct 25, 2001 at 07:19 UTC | |
by jeroenes (Priest) on Oct 25, 2001 at 10:10 UTC |