[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10958 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10958 - gnunet/src/util |
Date: |
Sat, 17 Apr 2010 12:35:44 +0200 |
Author: durner
Date: 2010-04-17 12:35:44 +0200 (Sat, 17 Apr 2010)
New Revision: 10958
Modified:
gnunet/src/util/disk.c
gnunet/src/util/test_os_start_process.c
Log:
MinGW pipes
Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c 2010-04-17 09:21:29 UTC (rev 10957)
+++ gnunet/src/util/disk.c 2010-04-17 10:35:44 UTC (rev 10958)
@@ -1688,7 +1688,6 @@
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)
{
@@ -1697,6 +1696,7 @@
SetErrnoFromWinError (GetLastError ());
ret = GNUNET_SYSERR;
}
+ p->fd[0]->h = INVALID_HANDLE_VALUE;
}
else if (end == GNUNET_DISK_PIPE_END_WRITE)
{
@@ -1705,6 +1705,7 @@
SetErrnoFromWinError (GetLastError ());
ret = GNUNET_SYSERR;
}
+ p->fd[1]->h = INVALID_HANDLE_VALUE;
}
save = errno;
#else
Modified: gnunet/src/util/test_os_start_process.c
===================================================================
--- gnunet/src/util/test_os_start_process.c 2010-04-17 09:21:29 UTC (rev
10957)
+++ gnunet/src/util/test_os_start_process.c 2010-04-17 10:35:44 UTC (rev
10958)
@@ -102,8 +102,8 @@
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");
@@ -126,8 +126,10 @@
/* 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10958 - gnunet/src/util,
gnunet <=