S6LOCKD(8)

NAME
s6lockd - s6-s6lock(7) daemon which manages a set of lock files in a given directory, and associated timeouts

DESCRIPTION
s6lockd does not fork, does not background itself automatically, and does not use syslog. It is not meant to be run directly by the user: it will be spawned by the s6-s6lock(7) client library.

There are two ways to use s6lockd:

1.  Use the s6lock_startf() library call. An s6lockd child will then be spawned from your calling process, and automatically reaped when you call s6lock_end(). It requires care with applications that trap SIGCHLD. It also requires care with lock file permissions: an s6lockd instance might not be able to open a lock file created by a former instance run by another client with different permissions.

2.  Use the s6lock_start() library call, together with an s6lockd s6-local-service(7). For once, this is the recommended setup: s6lockd creates empty lock files, and having all s6lockd instances run under the same user simplifies permissions management considerably.

When run as a service, s6lockd has no “standalone” mode: it is designed to work with a Unix domain super-server, like s6-ipcserver(8). s6lockd follows the UCSPI[1] interface; it can be directly executed from the super-server.

Unix does not natively provide a way to stop blocking on a lock acquisition after a timeout. To emulate such behaviour, s6lockd actually spawns an s6lockd-helper(8) child per requested lock.

SEE ALSO
s6-setlock(8), s6lockd-helper(8)

[1] https://cr.yp.to/proto/ucspi.txt

This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/libs6/s6lockd.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)