Re: Singleton process
From: Ben Morrow (usenet_at_morrow.me.uk)
Date: 10/29/03
- Next message: Ole: "fork process to handle fifo input"
- Previous message: Ben Morrow: "Re: How to generate this list?"
- In reply to: Mark Jason Dominus: "Re: Singleton process"
- Next in thread: Bart Lateur: "Re: Singleton process"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Oct 2003 16:55:39 +0000 (UTC)
mjd@plover.com (Mark Jason Dominus) wrote:
> In article <bnm7vm$eel$2@wisteria.csv.warwick.ac.uk>,
> Ben Morrow <usenet@morrow.me.uk> wrote:
> >
> >tassilo.parseval@post.rwth-aachen.de wrote:
> >> Also sprach Roy Johnson:
> >>
> >> > I've got a program that I want to be the only instance of itself
> >> > running at any given time. What *should* I be doing, for maximum
> >> > reliability on both Unix and Windows?
> >>
> >What if the process is killed and leaves a stale lockfile around?
>
> Can I suggest the following delightful and foolproof solution to this
> problem?
>
> http://perl.plover.com/yak/flock/samples/slide006.html
Nice, as usual :).
The problem of Win32 failing to break locks when a process is killed
(and I believe sometimes even failing to break them across reboots) is
of course not a Perl problem.
Ben
--
Although few may originate a policy, we are all able to judge it.
- Pericles of Athens, c.430 B.C.
ben@morrow.me.uk
- Next message: Ole: "fork process to handle fifo input"
- Previous message: Ben Morrow: "Re: How to generate this list?"
- In reply to: Mark Jason Dominus: "Re: Singleton process"
- Next in thread: Bart Lateur: "Re: Singleton process"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]