help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Self terminating code for bash scripts


From: Greg Wooledge
Subject: Re: [Help-bash] Self terminating code for bash scripts
Date: Tue, 19 Mar 2013 11:11:59 -0400
User-agent: Mutt/1.4.2.3i

On Tue, Mar 19, 2013 at 02:56:15PM +0000, adrelanos wrote:
> When I am running a script, I wish, that it kills any previous instances
> of itself in case it is still running. How can I do that?

Are you sure you want to kill already-running instances, rather than
simply exiting to let them continue running without interference?

There's some discussion here:

http://mywiki.wooledge.org/ProcessManagement#How_do_I_make_sure_only_one_copy_of_my_script_can_run_at_a_time.3F

But it mostly deals with using locks to detect an already-running instance
so that you can gracefully exit -- not kill the other guy.

Can you tell us what you're actually trying to do?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]