summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/dup.c
blob: 5ee521305b48817af025950d3431bd5b949a9c75 (plain)
1
2
3
4
5
6
7
8
9
10
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);
}