summaryrefslogtreecommitdiffstats
path: root/fd_copy.3
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2013-02-04 00:08:53 +0100
committermanuel <manuel@mausz.at>2013-02-04 00:08:53 +0100
commit69aec538b456402170dc723af417ba5c05389c32 (patch)
treee6f34c543f17c6392447ea337b2e2868212424d1 /fd_copy.3
downloadqmail-69aec538b456402170dc723af417ba5c05389c32.tar.gz
qmail-69aec538b456402170dc723af417ba5c05389c32.tar.bz2
qmail-69aec538b456402170dc723af417ba5c05389c32.zip
qmail 1.03 import
Diffstat (limited to 'fd_copy.3')
-rw-r--r--fd_copy.344
1 files changed, 44 insertions, 0 deletions
diff --git a/fd_copy.3 b/fd_copy.3
new file mode 100644
index 0000000..758a7e7
--- /dev/null
+++ b/fd_copy.3
@@ -0,0 +1,44 @@
1.TH fd_copy 3
2.SH NAME
3fd_copy \- duplicate a descriptor
4.SH SYNTAX
5.B #include <fd.h>
6
7int \fBfd_copy\fP(\fIto\fR,\fIfrom\fR);
8
9int \fIto\fR;
10.br
11int \fIfrom\fR;
12.SH DESCRIPTION
13.B fd_copy
14copies
15descriptor
16.I from
17to descriptor
18.IR to .
19If
20.I to
21was already open,
22.B fd_copy
23closes it.
24.B fd_copy
25always leaves
26.I from
27intact;
28if
29.I to
30and
31.I from
32are the same number,
33.B fd_copy
34does nothing.
35
36.B fd_copy
37returns 0 on success, -1 on error.
38.B fd_copy
39does not guarantee that
40.I to
41will remain open, if it was open, in case of error.
42.SH "SEE ALSO"
43dup(2),
44fd_move(3)