libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit 7e6e53c94940fecf94676f5fe2a61305d16f2bc6
parent bcffd0d4ccde70db21204bc0b3c0bf23e28aeeec
Author: Nils Durner <durner@gnunet.org>
Date:   Sun, 20 Jun 2010 13:00:47 +0000

mingw port

Diffstat:
Msrc/main/extractor.c | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/main/extractor.c b/src/main/extractor.c @@ -1399,6 +1399,9 @@ start_process (struct EXTRACTOR_PluginList *plugin) int p2[2]; pid_t pid; int status; +#ifdef WINDOWS + HANDLE process; +#endif plugin->cpid = -1; #ifndef WINDOWS @@ -1461,8 +1464,15 @@ start_process (struct EXTRACTOR_PluginList *plugin) if (plugin->cpipe_in == NULL) { perror ("fdopen"); +#ifndef WINDOWS (void) kill (plugin->cpid, SIGKILL); waitpid (plugin->cpid, &status, 0); +#else + process = OpenProcess (PROCESS_TERMINATE | SYNCHRONIZE, FALSE, plugin->cpid); + TerminateProcess (process, 0); + WaitForSingleObject (process, INFINITE); + CloseHandle (process); +#endif close (p1[1]); close (p2[0]); plugin->cpid = -1;