commit 40da9d2e342273ddfba56c9ab02cb09d35f4e0f1
parent 3e35738130ab4942bd9e807d51b20b7cd6e61943
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date: Tue, 10 Mar 2015 09:07:42 +0000
fd_copy/fd_move doc fix
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/libstddjb/djbunix.html b/doc/libstddjb/djbunix.html
@@ -90,8 +90,8 @@ but both ends of the created pipe are in non-blocking mode <em>and</em> close-on
<p>
<code> int fd_copy (int to, int from) </code> <br />
-Copies the open fd <em>from</em> to number <em>to</em>. <em>to</em>
-must not refer to an already open fd.
+Copies the open fd <em>from</em> to number <em>to</em>. If <em>to</em>
+was already open, it is closed before the copy.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
</p>
@@ -104,8 +104,8 @@ Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
<p>
<code> int fd_move (int to, int from) </code> <br />
-Moves the open fd <em>from</em> to number <em>to</em>. <em>to</em>
-must not refer to an already open fd, unless it's equal to <em>from</em>.
+Moves the open fd <em>from</em> to number <em>to</em>. If <em>to</em>
+was already open, it is closed before the move.
Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
</p>