dup.c - 9base - revived minimalist port of Plan 9 userland to Unix
(HTM) git clone git://git.suckless.org/9base
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
dup.c (136B)
---
1 #include <u.h>
2 #include <libc.h>
3
4 #undef dup
5
6 int
7 p9dup(int old, int new)
8 {
9 if(new == -1)
10 return dup(old);
11 return dup2(old, new);
12 }