repo.or.cz
/
trinity.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
note a leak that needs fixing eventually
[trinity.git]
/
syscalls
/
dup2.c
blob
626df5b2e8952c36351ba5c698c895f5280aacd4
1
/*
2
* SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
3
*
4
* On success, returns the new descriptor.
5
* On error, -1 is returned, and errno is set appropriately.
6
*/
7
#include
"sanitise.h"
8
9
struct
syscallentry syscall_dup2
= {
10
.
name
=
"dup2"
,
11
.
num_args
=
2
,
12
.
arg1name
=
"oldfd"
,
13
.
arg1type
=
ARG_FD
,
14
.
arg2name
=
"newfd"
,
15
.
arg2type
=
ARG_FD
,
16
.
rettype
=
RET_FD
,
17
.
flags
=
NEED_ALARM
,
18
};