diff options
Diffstat (limited to 'otherlibs/unix/dup.c')
-rw-r--r-- | otherlibs/unix/dup.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/otherlibs/unix/dup.c b/otherlibs/unix/dup.c new file mode 100644 index 000000000..5ee521305 --- /dev/null +++ b/otherlibs/unix/dup.c @@ -0,0 +1,11 @@ +#include <mlvalues.h> +#include "unix.h" + +value unix_dup(fd) /* ML */ + value fd; +{ + int ret; + ret = dup(Int_val(fd)); + if (ret == -1) uerror("dup", Nothing); + return Val_int(ret); +} |