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