plan9port

[fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port # fast
git clone https://src.adamsgaard.dk/plan9port.git # slow
Log | Files | Refs | README | LICENSE Back to index

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 }