int ret = GNUNET_OK;
int save;
- /* FIXME: What can we safely set HANDLE to once we've closed an end, NULL? */
#ifdef MINGW
if (end == GNUNET_DISK_PIPE_END_READ)
{
SetErrnoFromWinError (GetLastError ());
ret = GNUNET_SYSERR;
}
+ p->fd[0]->h = INVALID_HANDLE_VALUE;
}
else if (end == GNUNET_DISK_PIPE_END_WRITE)
{
SetErrnoFromWinError (GetLastError ());
ret = GNUNET_SYSERR;
}
+ p->fd[1]->h = INVALID_HANDLE_VALUE;
}
save = errno;
#else
task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
char *fn;
-
const struct GNUNET_DISK_FileHandle *stdout_read_handle;
+ struct GNUNET_DISK_FileHandle *wh;
GNUNET_asprintf(&fn, "cat");
/* Close the read end of the write pipe */
GNUNET_DISK_pipe_close_end(hello_pipe_stdin, GNUNET_DISK_PIPE_END_READ);
+ wh = GNUNET_DISK_pipe_handle (hello_pipe_stdin, GNUNET_DISK_PIPE_END_WRITE);
+
/* Write the test_phrase to the cat process */
- if (GNUNET_DISK_file_write(hello_pipe_stdin, test_phrase, strlen(test_phrase) + 1) != GNUNET_YES)
+ if (GNUNET_DISK_file_write(wh, test_phrase, strlen(test_phrase) + 1) != GNUNET_YES)
{
ok = 1;
return;