note a leak that needs fixing eventually
[trinity.git] / syscalls / dup2.c
blob626df5b2e8952c36351ba5c698c895f5280aacd4
1 /*
2 * SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
4 * On success, returns the new descriptor.
5 * On error, -1 is returned, and errno is set appropriately.
6 */
7 #include "sanitise.h"
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,