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: adrelanos
Subject: Re: [Help-bash] Self terminating code for bash scripts
Date: Tue, 19 Mar 2013 16:39:49 +0000

Greg Wooledge:
> On Tue, Mar 19, 2013 at 03:38:17PM +0000, adrelanos wrote:
>> In general I get your point, which is valid. Perhaps I am doing a very
>> corner case. A script is checking some stuff (mostly versioning checks
>> form web). In case it was already run automatically, it adds a delay
>> before running the checks. If the user decides to run it right away, the
>> old script and therefore the delay gets terminated and the checks
>> immediately being.
> 
> One way to approach that would be to have the delayed instance check
> for the existence of a "never mind, I already did it" file after the
> delay has expired.  That is, assuming it's OK to have this delayed thing
> sleeping in the background for a while before it wakes up, finds the file,
> removes it, and terminates itself.

Yes, good way to prevent the process killing. Didn't think of that one.




reply via email to

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