15 static char buf
[sizeof "something\n"];
24 f
= popen ("echo something", "r");
26 error (EXIT_FAILURE
, errno
, "popen failed");
27 if (fgets (buf
, sizeof (buf
), f
) == NULL
)
28 error (EXIT_FAILURE
, 0, "fgets failed");
29 if (strcmp (buf
, "something\n"))
30 error (EXIT_FAILURE
, 0, "read wrong data");
32 error (EXIT_FAILURE
, errno
, "pclose returned non-zero");
33 if ((err
= pthread_create (&p
, NULL
, dummy
, NULL
)))
34 error (EXIT_FAILURE
, err
, "pthread_create failed");
35 if ((err
= pthread_join (p
, NULL
)))
36 error (EXIT_FAILURE
, err
, "pthread_join failed");
40 #define TEST_FUNCTION do_test ()
41 #include "../test-skeleton.c"