X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Ftest_os_start_process.c;h=f66e741d9f7be9b3f473597e3a62707c961478e2;hb=e62ce5b19244ae28472bf0e02b19c3f905f1ee0a;hp=4137118fad0187ec25589b9019ea7fc89159e968;hpb=502af2167f7c218366666ca4944bd7cc54b5b19a;p=oweals%2Fgnunet.git diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c index 4137118fa..f66e741d9 100644 --- a/src/util/test_os_start_process.c +++ b/src/util/test_os_start_process.c @@ -33,7 +33,7 @@ #include "gnunet_scheduler_lib.h" #include "disk.h" -#define VERBOSE GNUNET_NO +#define VERBOSE GNUNET_EXTRA_LOGGING static char *test_phrase = "HELLO WORLD"; static int ok; @@ -75,7 +75,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) bytes = GNUNET_DISK_file_read (stdout_read_handle, &buf, sizeof (buf)); #if VERBOSE - fprintf (stderr, "bytes is %d\n", bytes); + FPRINTF (stderr, "bytes is %d\n", bytes); #endif if (bytes < 1) @@ -89,7 +89,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) ok = strncmp (&buf[0], test_phrase, strlen (test_phrase)); #if VERBOSE - fprintf (stderr, "read %s\n", &buf[0]); + FPRINTF (stderr, "read %s\n", &buf[0]); #endif if (ok == 0) { @@ -114,8 +114,8 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_asprintf (&fn, "cat"); - hello_pipe_stdin = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO); - hello_pipe_stdout = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_NO, GNUNET_YES); + hello_pipe_stdin = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_YES, GNUNET_NO); + hello_pipe_stdout = GNUNET_DISK_pipe (GNUNET_YES, GNUNET_YES, GNUNET_NO, GNUNET_YES); if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL)) { @@ -125,8 +125,9 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) return; } - proc = GNUNET_OS_start_process (hello_pipe_stdin, hello_pipe_stdout, fn, - "test_gnunet_echo_hello", "-", NULL); + proc = + GNUNET_OS_start_process (hello_pipe_stdin, hello_pipe_stdout, fn, + "test_gnunet_echo_hello", "-", NULL); GNUNET_free (fn); /* Close the write end of the read pipe */