int bytes;
bytes = GNUNET_DISK_file_read(stdout_read_handle, &buf, sizeof(buf));
+#if VERBOSE
+ fprintf(stderr, "bytes is %d\n", bytes);
+#endif
+
if (bytes < 1)
{
ok = 1;
task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
char *fn;
- char *buf;
int fd_stdout;
int fd_stdin;
const struct GNUNET_DISK_FileHandle *stdout_read_handle;
- buf = GNUNET_malloc(strlen(test_phrase) + 1);
GNUNET_asprintf(&fn, "cat");
hello_pipe_stdin = GNUNET_DISK_pipe(GNUNET_YES);
if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL))
{
ok = 1;
+ GNUNET_free (fn);
return;
}
pid = GNUNET_OS_start_process (hello_pipe_stdin, hello_pipe_stdout, fn,
- "test_gnunet_echo_hello", NULL);
+ "test_gnunet_echo_hello", "-", NULL);
+ GNUNET_free (fn);
/* Close the write end of the read pipe */
GNUNET_DISK_pipe_close_end(hello_pipe_stdout, GNUNET_DISK_PIPE_END_WRITE);
GNUNET_SCHEDULER_add_read_file (tc->sched,
GNUNET_TIME_UNIT_FOREVER_REL,
stdout_read_handle, &read_call, (void *)stdout_read_handle);
- /* Read from the cat process, hopefully get the phrase we wrote to it! */
- /*while (read(fd_stdout, buf, strlen(test_phrase) + 1) > 0)
- {
- ret = strncmp(buf, test_phrase, strlen(test_phrase));
- }
- */
}
/**