about summary refs log tree commit diff
path: root/doc/s6-setlock.html
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-11 08:13:01 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-11 08:13:01 +0000
commitbc3863eaf3e4ae92eac8cd3ce0ca9dcb8915fc36 (patch)
tree9c6d891677e1d48aa4219636bff1c103d9509a7d /doc/s6-setlock.html
parentddc088fba6016ae839afaa208b0a441869dc936f (diff)
downloads6-bc3863eaf3e4ae92eac8cd3ce0ca9dcb8915fc36.tar.gz
s6-bc3863eaf3e4ae92eac8cd3ce0ca9dcb8915fc36.tar.xz
s6-bc3863eaf3e4ae92eac8cd3ce0ca9dcb8915fc36.zip
Better s6-setlock; delete the s6lock subsystem
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'doc/s6-setlock.html')
-rw-r--r--doc/s6-setlock.html16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/s6-setlock.html b/doc/s6-setlock.html
index c2e8fbf..91e2fcc 100644
--- a/doc/s6-setlock.html
+++ b/doc/s6-setlock.html
@@ -25,7 +25,7 @@ s6-setlock takes a lock on a file, then executes into another program.
 <h2> Interface </h2>
 
 <pre>
-     s6-setlock [ -n | -N | -t <em>timeout</em> ] [ -r | -w ] <em>file</em> <em>prog...</em>
+     s6-setlock [ -n | -N ] [ -t <em>timeout</em> ] [ -d <em>fd</em> ] [ -r | -w ] <em>file</em> <em>prog...</em>
 </pre>
 
 <ul>
@@ -46,20 +46,20 @@ the lock after <em>timeout</em> milliseconds, it will exit 1. </li>
  <li> <tt>-r</tt>&nbsp;: shared lock. Other shared locks on the same file will not prevent
 the lock from being acquired (but an exclusive lock will). </li>
  <li> <tt>-w</tt>&nbsp;: exclusive lock. This is the default. </li>
+ <li> <tt>-d&nbsp;<em>fd</em></tt>&nbsp;: make the lock visible in <em>prog</em>
+on file descriptor <em>fd</em>. </li>
 </ul>
 
 <h2> Notes </h2>
 
 <ul>
- <li> s6-setlock leaks an open file descriptor into the <em>prog</em>
+ <li>
+s6-setlock leaks an open file descriptor into the <em>prog</em>
 execution. This is intended: the fd holds the lock, which is released
 when <em>prog</em> exits. <em>prog</em> must not touch fds it does not
-know about. </li>
- <li> If the timed lock option is chosen, s6-setlock does not acquire the lock
-itself. Instead, it spawns a <a href="libs6/s6lockd-helper.html">s6lockd-helper</a>
-process that acquires the lock while s6-setlock controls the timeout; the
-s6lockd-helper process then holds the lock and lives as long as
-<em>prog</em>. </li>
+know about; by default it has no need to know the descriptor that holds
+the lock. But if you need to officialize the presence of the lock in
+<em>prog</em>, that's where the <tt>-d</tt> option comes in. </li>
 </ul>
 
 </body>