From cb49cb30fe65d4ee317572f232f7017a8c1fe6a2 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 21 Apr 2017 09:13:00 +0000 Subject: Add -n to s6-ln; document its nonposixness --- doc/s6-ln.html | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'doc/s6-ln.html') diff --git a/doc/s6-ln.html b/doc/s6-ln.html index 3ca0245..1417c35 100644 --- a/doc/s6-ln.html +++ b/doc/s6-ln.html @@ -25,7 +25,7 @@

Interface

-     s6-ln [ -s ] [ -f ] [ -L ] [ -P ] old new
+     s6-ln [ -n ] [ -s ] [ -f ] [ -L ] [ -P ] source... target
 

@@ -33,12 +33,31 @@ ln utility.

+

Options

+ + +

Posixness

- s6-ln is suitable as a Single Unix + s6-ln would be suitable as a Single Unix ln -program. +program, except that POSIX mandates that a preexisting target must first +be unlink()ed and then (sym)link()ed, which prevents +atomic replacements. + s6-ln aims to be reliable and allow for atomic replacements, so it +deviates from POSIX on that point: when target exists and needs to +be replaced, s6-ln first creates a (sym)link to a unique temporary +name, then rename()s the temporary name to target. This +behaviour makes sure that target is atomically replaced - there's +no point in time where it does not exist.

-- cgit v1.2.3