#545286 mention setlock -n return value

Package:
daemontools
Source:
daemontools
Description:
collection of tools for managing UNIX services
Submitter:
Date:
2025-05-04 09:45:03 UTC
Severity:
wishlist
#545286#5
Date:
2009-09-06 09:47:48 UTC
From:
To:
Mention return value of
       -n     No delay. If fn is locked by another process, setlock gives up.

#545286#10
Date:
2014-07-31 10:00:35 UTC
From:
To:
Please provide a patch,
 git clone http://smarden.org/git/daemontools.git

#545286#15
Date:
2014-07-31 18:19:16 UTC
From:
To:
(Maybe the value is 1? I didn't check.)
#545286#20
Date:
2025-05-04 09:42:30 UTC
From:
To:
Hi Dan e.a.,

Le Sun, Sep 06, 2009 at 05:47:48PM +0800, jidanni@jidanni.org a écrit :
[...]

Thanks for your bugreport, I've spend some time on it.

One can find the setlock source at
https://salsa.debian.org/debian/daemontools/-/blob/debian/latest/daemontools-0.76/src/setlock.c?ref_type=heads
The setlock(8) manpage is basically a copy of
http://cr.yp.to/daemontools/setlock.html .

Unfortunately I failed to understand the source, and cannot tell wether

 s/setlock gives up/setlock gives up and exits nonzero/

is the right fix for this...

HTH someone anyway.

Bye,

Joost