parallel
[Top][All Lists]
Advanced

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

Re: singleton for script with shebang


From: Bradley
Subject: Re: singleton for script with shebang
Date: Sat, 3 Jan 2015 13:09:26 -0800

So did you provide for a way to give up immediately if sem cannot be acquired 
immediately?

Bradley



> On Jan 3, 27 Heisei, at 11:21 AM, Ole Tange <ole@tange.dk> wrote:
> 
>> On Fri, Jan 2, 2015 at 8:53 PM, Bradley Asztalos <brad@customweather.com> 
>> wrote:
>>> On Fri, Jan 2, 2015 at 7:35 AM, Ole Tange <ole@tange.dk> wrote:
>>> On Fri, Jan 2, 2015 at 10:51 AM, Bradley Asztalos
>>> <brad@customweather.com> wrote:
> :
>>> So that is almost the opposite of --semaphoretimeout
>>> 
>>> Maybe it should be able to take a negative value: If you cannot get
>>> the semaphore within 2 seconds, give up.
>>> 
>>> sem --semaphoretimeout -2 do_stuff
> 
>> That would work.
>> 
>> Does --semaphoretimeout 0 mean never give up?
> 
> Yes: Just as if the option had not been given.
> 
>> If so then -0 could mean give up immediately.
> 
> -0 = 0, so no.
> 
> It is implemented in the git version.
> 
>> By the way the note on the sem man page says that sem --timeout is not
>> implemented.
> 
> I have updated the man page.
> 
> --timeout is for timing out the running of the command.
> 
> --semaphoretimeout is for timing out on getting the semaphore.
> 
> 
> /Ole



reply via email to

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