aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-08-03 23:14:12 +0000
committerLaurent Bercot <ska@appnovation.com>2025-08-03 23:14:12 +0000
commitf23996b445422bdc79b4a16da63c740ae6bddda9 (patch)
treed743e3f9a32b4d786db8e719d26901ad2b2d0a0b /doc
parent46f12f13e6667e7820bad71bb8c66ab9c564f58a (diff)
downloadskalibs-f23996b445422bdc79b4a16da63c740ae6bddda9.tar.gz
Add mkntemp, atomic_symlink4
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/libunixonacid/unix-transactional.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/libunixonacid/unix-transactional.html b/doc/libunixonacid/unix-transactional.html
index 9a36173..b429001 100644
--- a/doc/libunixonacid/unix-transactional.html
+++ b/doc/libunixonacid/unix-transactional.html
@@ -128,5 +128,22 @@ The difference between these two functions is the same as that between
<tt>rm_rf</tt> and <tt>rm_rf_tmp</tt> in <tt>djbunix</tt>.
</p>
+<h3> Atomic symbolic link creation <h3>
+
+<p>
+<code> int atomic_symlink4 (char const *target, char const *name, char *buf, size_t len) </code>
+Atomically makes a symlink named <em>name</em> pointing to <em>target</em>. If
+<em>name</em> designated an existing file, it is unlinked. Does not work if
+<em>name</em> is an existing directory (but <em>will</em> work if it is a
+symlink to a directory!) Returns 1 on success, and 0 (and sets errno) on
+error. <br>
+In addition, if <em>buf</em> is not NULL, and points
+to a buffer of nonzero length <em>len</em>, then if <em>name</em> exists prior to the
+call, it must be a symbolic link, and its target be shorter than <em>len</em> bytes.
+If these conditions are fulfilled, the operation succeeds, and <em>buf</em> then
+contains the previous target of <em>name</em>, with a terminating NULL. If they are not,
+the function fails with 0 (errno is ENAMETOOLONG if the buffer is too small).
+</p>
+
</body>
</html>