summaryrefslogtreecommitdiffstats
path: root/fd_move.3
diff options
context:
space:
mode:
Diffstat (limited to 'fd_move.3')
-rw-r--r--fd_move.341
1 files changed, 41 insertions, 0 deletions
diff --git a/fd_move.3 b/fd_move.3
new file mode 100644
index 0000000..94aa1b7
--- /dev/null
+++ b/fd_move.3
@@ -0,0 +1,41 @@
1.TH fd_move 3
2.SH NAME
3fd_move \- renumber a descriptor
4.SH SYNTAX
5.B #include <fd.h>
6
7int \fBfd_move\fP(\fIto\fR,\fIfrom\fR);
8
9int \fIto\fR;
10.br
11int \fIfrom\fR;
12.SH DESCRIPTION
13.B fd_move
14moves
15descriptor
16.I from
17to descriptor
18.IR to .
19If
20.I to
21was already open,
22.B fd_move
23closes it.
24If the move is successful,
25.B fd_move
26closes
27.IR from .
28Exception:
29if
30.I to
31and
32.I from
33are the same number,
34.B fd_move
35does nothing.
36
37.B fd_move
38returns 0 on success, -1 on error.
39.SH "SEE ALSO"
40dup(2),
41fd_copy(3)