2007/10/4, Mark Wagner <[EMAIL PROTECTED]>:
>
> Will an END block get executed even if the script exits through an
> error such as calling an undefined function?
>
If script die by itself,END is executed.
Some kill signals like SIGINT,SIGTERM can let script die and END be
executed,but some won't,
On Wed, 2007-10-03 at 13:34 -0700, Mark Wagner wrote:
> I've got a Perl program that is run once an hour as a cron job.
> Normally it finishes its task in about ten minutes, but occasionally
> it takes more than an hour to complete. When this happens, a second
> copy is started, the two copies st
On 10/3/07, Bob McConnell <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Elizabeth Cortell [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 03, 2007 4:48 PM
> > To: beginners@perl.org
> > Subject: Re: Limiting a program to a single r
On 10/3/07, Mark Wagner <[EMAIL PROTECTED]> wrote:
> On 10/3/07, Elizabeth Cortell <[EMAIL PROTECTED]> wrote:
>
> > I suggest (untested, but we do something like this in the office):
> > Upon startup, check for the existence of a lockfile with agreed-upon name
> > in some tmp directory. If it exi
On 10/3/07, Elizabeth Cortell <[EMAIL PROTECTED]> wrote:
> Checking for instances by grepping the output of ps tends to also catch
> instances of
>
> vi myscript.pl
>
> So that innocently editing the file on that box keeps it from running! Not
> what you have in mind, I think.
snip
Which is why
On 10/3/07, Elizabeth Cortell <[EMAIL PROTECTED]> wrote:
> I suggest (untested, but we do something like this in the office):
> Upon startup, check for the existence of a lockfile with agreed-upon name in
> some tmp directory. If it exists, exit immediately; otherwise create the
> file. Remove
> -Original Message-
> From: Elizabeth Cortell [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 03, 2007 4:48 PM
> To: beginners@perl.org
> Subject: Re: Limiting a program to a single running instance
>
> Checking for instances by grepping the output of ps t
Checking for instances by grepping the output of ps tends to also catch
instances of
vi myscript.pl
So that innocently editing the file on that box keeps it from running! Not what
you have in mind, I think.
I suggest (untested, but we do something like this in the office):
Upon startup, check
On 10/3/07, Mark Wagner <[EMAIL PROTECTED]> wrote:
> I've got a Perl program that is run once an hour as a cron job.
> Normally it finishes its task in about ten minutes, but occasionally
> it takes more than an hour to complete. When this happens, a second
> copy is started, the two copies step o