debian/rules: Use `git' potty wrapper.
[qmail] / fd_move.3
CommitLineData
2117e02e
MW
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)