9 FILE *fp
= popen ("echo hello", "r");
12 puts ("first popen failed");
18 if (fcntl (fd
, F_GETFD
) == FD_CLOEXEC
)
20 puts ("first popen(\"r\") set FD_CLOEXEC");
27 fp
= popen ("echo hello", "re");
30 puts ("second popen failed");
36 if (fcntl (fd
, F_GETFD
) != FD_CLOEXEC
)
38 puts ("second popen(\"r\") did not set FD_CLOEXEC");
48 #define TEST_FUNCTION do_test ()
49 #include "../test-skeleton.c"