[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r25993 - Extractor/src/main
From: |
gnunet |
Subject: |
[GNUnet-SVN] r25993 - Extractor/src/main |
Date: |
Sun, 3 Feb 2013 18:17:40 +0100 |
Author: LRN
Date: 2013-02-03 18:17:39 +0100 (Sun, 03 Feb 2013)
New Revision: 25993
Modified:
Extractor/src/main/extractor_ipc_w32.c
Extractor/src/main/extractor_plugin_main.c
Log:
Use NUL on W32 as /dev/null, don't kill children outright
Modified: Extractor/src/main/extractor_ipc_w32.c
===================================================================
--- Extractor/src/main/extractor_ipc_w32.c 2013-02-03 12:59:42 UTC (rev
25992)
+++ Extractor/src/main/extractor_ipc_w32.c 2013-02-03 17:17:39 UTC (rev
25993)
@@ -588,8 +588,6 @@
{
int status;
- TerminateProcess (channel->hProcess, 0);
- CloseHandle (channel->hProcess);
CloseHandle (channel->cpipe_out);
CloseHandle (channel->cpipe_in);
CloseHandle (channel->ov_read.hEvent);
@@ -602,6 +600,9 @@
if (NULL != channel->plugin)
channel->plugin->channel = NULL;
free (channel->mdata);
+ WaitForSingleObject (channel->hProcess, 1000);
+ TerminateProcess (channel->hProcess, 0);
+ CloseHandle (channel->hProcess);
free (channel);
}
Modified: Extractor/src/main/extractor_plugin_main.c
===================================================================
--- Extractor/src/main/extractor_plugin_main.c 2013-02-03 12:59:42 UTC (rev
25992)
+++ Extractor/src/main/extractor_plugin_main.c 2013-02-03 17:17:39 UTC (rev
25993)
@@ -543,7 +543,6 @@
}
-#ifndef WINDOWS
/**
* Open '/dev/null' and make the result the given
* file descriptor.
@@ -557,7 +556,11 @@
{
int fd;
+#ifndef WINDOWS
fd = open ("/dev/null", flags);
+#else
+ fd = open ("\\\\?\\NUL", flags);
+#endif
if (-1 == fd)
{
LOG_STRERROR_FILE ("open", "/dev/null");
@@ -575,7 +578,6 @@
if (0 != close (fd))
LOG_STRERROR ("close");
}
-#endif
/**
@@ -605,18 +607,14 @@
{
if (0 != close (2))
LOG_STRERROR ("close");
-#ifndef WINDOWS
open_dev_null (2, O_WRONLY);
-#endif
}
if ( (NULL != plugin->specials) &&
(NULL != strstr (plugin->specials, "close-stdout")))
{
if (0 != close (1))
LOG_STRERROR ("close");
-#ifndef WINDOWS
open_dev_null (1, O_WRONLY);
-#endif
}
pc.plugin = plugin;
pc.in = in;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r25993 - Extractor/src/main,
gnunet <=