Home | History | Annotate | Download | only in tests
      1 #include <unistd.h>
      2 #include <stdio.h>
      3 #include <fcntl.h>
      4 #include "fdleak.h"
      5 
      6 int main (int argc, char **argv)
      7 {
      8    int s1;
      9 
     10    CLOSE_INHERITED_FDS;
     11 
     12    s1 = DO( open("/dev/null", O_RDONLY) );
     13    DO( fcntl(s1, F_DUPFD, s1) );
     14 
     15    return 0;
     16 }
     17