On Tue, Sep 4, 2018 at 5:47 PM, Cameron Simpson wrote:
>
> The downside with mkdir, and also with pd files really, is that a program or
> OS abort can leave them lying around. Being persistent objects, some kind of
> cleanup is needed.
While the OP needs a cross-platform solution, if it's just
On 03Sep2018 07:45, Malcolm Greene wrote:
>Use case: Want to prevent 2+ instances of a script from running ...
>ideally in a cross platform manner. I've been researching this topic and
>am surprised how complicated this capability appears to be and how the
>diverse the solution set is. I've seen
On 09/04/2018 05:35 AM, Cameron Simpson wrote:
> On 03Sep2018 07:45, Malcolm Greene wrote:
>> Use case: Want to prevent 2+ instances of a script from running ...
>> ideally in a cross platform manner. I've been researching this topic and
>> am surprised how complicated this capability appears to
What about using flock()? I don't know if it works on Windows, but it works
really well for Unix/Linux systems. I typically create a log file in a known
location using any atomic method that doesn't replace/overwrite a file, and
flock() it for the duration of the script.
Thanks,
Cem Karan
On
Use case: Want to prevent 2+ instances of a script from running ... ideally in
a cross platform manner. I've been researching this topic and am surprised how
complicated this capability appears to be and how the diverse the solution set
is. I've seen solutions ranging from using directories, named
On 09/03/18 09:45, Malcolm Greene wrote:
> Use case: Want to prevent 2+ instances of a script from running ...
> ideally in a cross platform manner. I've been researching this topic and
> am surprised how complicated this capability appears to be and how the
> diverse the solution set is. I've
cleanup, mkdir is portable and releiable. (And you can store state information
inside the dir!)
Given the subject line ("Cross platform mutex to prevent script running more
than instance") I'd go for mkdir myself.
Cheers,
Cameron Simpson
Thanks,
Cem Karan
On Mon, Sep 3, 2018
On 09/04/2018 05:35 AM, Cameron Simpson wrote:
On 03Sep2018 07:45, Malcolm Greene wrote:
Use case: Want to prevent 2+ instances of a script from running ...
ideally in a cross platform manner. I've been researching this topic and
am surprised how complicated this capability appears to be and
What about using flock()? I don't know if it works on Windows, but it works
really well for Unix/Linux systems. I typically create a log file in a
known location using any atomic method that doesn't replace/overwrite a
file, and flock() it for the duration of the script.
Thanks,
Cem Karan
On
On 03Sep2018 07:45, Malcolm Greene wrote:
Use case: Want to prevent 2+ instances of a script from running ...
ideally in a cross platform manner. I've been researching this topic and
am surprised how complicated this capability appears to be and how the
diverse the solution set is. I've seen
On 09/03/18 09:45, Malcolm Greene wrote:
> Use case: Want to prevent 2+ instances of a script from running ...
> ideally in a cross platform manner. I've been researching this topic and
> am surprised how complicated this capability appears to be and how the
> diverse the solution set is. I've
Use case: Want to prevent 2+ instances of a script from running ...
ideally in a cross platform manner. I've been researching this topic and
am surprised how complicated this capability appears to be and how the
diverse the solution set is. I've seen solutions ranging from using
directories, named
12 matches
Mail list logo