On Mon, Mar 17, 2008 at 4:47 PM, Dermot <[EMAIL PROTECTED]> wrote:
snip
> print $fh $status."\n";
> print STDERR "$0: $! $?\n";
snip
$? holds the status returned by the last external call (call to
system() function, pipes, qx// operator, call to wait() or waitpid(),
Dermot wrote:
Hi,
Hello,
I have a cgi script that writes to a disk file. It would be safest if I can
get an exclusive lock on the file. I had a look at the opentut and believe I
have followed that the example there. Here's what I have
sysopen my $fh, $file_path, O_WRONLY || die "can't open $
Dermot wrote:
I have a cgi script that writes to a disk file. It would be safest if I can
get an exclusive lock on the file. I had a look at the opentut and believe I
have followed that the example there. Here's what I have
sysopen my $fh, $file_path, O_WRONLY || die "can't open
$
Dermot schreef:
>sysopen my $fh, $file_path, O_WRONLY
>|| die "can't open $file_path: $!\n";
Change or-operator (or use parenthesis).
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hi,
I have a cgi script that writes to a disk file. It would be safest if I can
get an exclusive lock on the file. I had a look at the opentut and believe I
have followed that the example there. Here's what I have
sysopen my $fh, $file_path, O_WRONLY || die "can't open
$file_path:
On 8/31/06, Nath, Alok (STSD) <[EMAIL PROTECTED]> wrote:
What I am seeing is when I enable the file locking commands
the file is completely wiped out.Just zero bytes.
#use lock to write into the file
sysopen( FH, $registerFile,
Nath, Alok (STSD) wrote:
> Hi,
Hello,
> I am trying to save data in an xml file.
> What I am seeing is when I enable the file locking commands
> the file is completely wiped out.Just zero bytes.
>
> But it works correctly when I remove the file locking commands.
>
&g
Hi,
I am trying to save data in an xml file.
What I am seeing is when I enable the file locking commands
the file is completely wiped out.Just zero bytes.
But it works correctly when I remove the file locking commands.
Please help ?? What I am
questions here ?
- Can I use file locking (flock command) mechanism while
writing/reading
from the XML
or there is some mechanism to avoid Reader/Writer problem ?
- Can it be used with XML processing or is it used only when you
open
the file.In my case
All locking modules use advisory locking hence it is not possible to
ensure that the file is not being touched unless you build the
intelligence into all possible scripts
Rory O'Connor wrote:
I am using File::Copy to move a file from one directory to another. However, I do not want to move the
> "Rory O'Connor" <[EMAIL PROTECTED]> said:
> I am using File::Copy to move a file from one directory to another. However, I do
>not want to move the file if it is being written to (by another program).
>
> Do i need to lock the file before moving it or does File::Copy by nature wait until
>
I am using File::Copy to move a file from one directory to another. However, I do not
want to move the file if it is being written to (by another program).
Do i need to lock the file before moving it or does File::Copy by nature wait until a
file is not being written to before moving?
I lo
m: Bob Showalter <[EMAIL PROTECTED]>
> To: 'Andy McDowell' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Subject: RE: Some advice needed on file locking with modperl'ed code
>
> > -Original Message-
> > From: Andy McDowell [mailto:[EMAIL PROTECTED]
> -Original Message-
> From: Andy McDowell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 15, 2001 6:37 AM
> To: [EMAIL PROTECTED]
> Subject: Some advice needed on file locking with modperl'ed code
>
>
> Hi All,
>
> I am writing a modperl we
Hi All,
I am writing a modperl webapp (the new web interface for the RipeNCC whois
database server) and I have need to store some data to a file.
Nothing heavy, just a few one liners like user query strings, screen used,
server process time and a few others to do some analysis work on potential
b
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 01, 2001 1:53 PM
> To: [EMAIL PROTECTED]
> Subject: Please ! Expert help needed - File locking
>
>
> Hi,
>
> I'm trying to use file locking to work w
Hi,
I'm trying to use file locking to work with the same file from
different scripts.
Each script may open the file in different mode.
For example:
Script1 opens for APPEND and Script2 opens the file for writing,
thus truncating the file and then writing the data.
I have rea
this should lock the file:
open(FH, ">>somefile.log") or print "can't append to file: $!";
flock(FH, 2) or die "can't flock file: $!";
# ~ output to file
close FH;
At 07:00 AM 8/24/2001, Joe Bellifont wrote:
>Hi,
>I have an html form that when submitted writes to a log file.
>How can
Hi,
I have an html form that when submitted writes to a log file.
How can I get a lock on this log file?
-because currently if multiple users submit simultaneously, then it leaves
the log file in a mess.
TIA.
-J
_
Get your FREE d
On Sat, Jul 28, 2001 at 04:15:33PM -0500, [EMAIL PROTECTED] wrote:
> #!/usr/local/bin/perl
>
> #use strict;
> use warnings;
>
> my $file = 'data';
> my $TIMEOUT = 10;
> sub LOCK_SH { 1 };
> sub LOCK_EX { 2 };
> sub LOCK_UN { 8 };
Do not manually define these constants. It will work, but it's b
I am trying to use L Stein's file locking subroutine from 'Official Guide
to Programming with CGI.pm' for a light duty cgi program I am writing. I'd
like to use 'use strict', but I can't get perl to agree with the return
at the end of the subroutine. (See retu
21 matches
Mail list logo