make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: process_easy: DuplicateHandle(In) failed (e=6)


From: J. Grant
Subject: Re: process_easy: DuplicateHandle(In) failed (e=6)
Date: Fri, 02 Apr 2004 00:05:29 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030824



on the 01/04/04 20:59, Eli Zaretskii wrote:
From: "twk" <address@hidden>
Date: Thu, 1 Apr 2004 09:23:01 -0500

I do not understand, though, why the version of cygwin would
have any influence on make's behavior when the make was
built native.

Presumably because Bash uses the Cygwin libraries and somehow screws
up file handle duplication.

Is e=6 ERROR_INVALID_HANDLE?  If you can replicate you can find out
exactly what the string is using the FormatMessage() change in the
attached patch.  Perhaps these error codes could be decoded into
meaningful strings? (For all of these e=%d style error messages.)


Regards

JG

--- sub_proc.c  2004-04-01 23:56:29.000000000 +0100
+++ sub_proc.c.orig     2004-04-01 23:36:52.000000000 +0100
@@ -1159,21 +1159,9 @@
                       0,
                       TRUE,
                       DUPLICATE_SAME_ACCESS) == FALSE) {
-    LPVOID error_string;
-    DWORD error_code = GetLastError();
-    DWORD format_string_code = FormatMessage(
-            FORMAT_MESSAGE_ALLOCATE_BUFFER |
-            FORMAT_MESSAGE_FROM_SYSTEM |
-            FORMAT_MESSAGE_IGNORE_INSERTS,
-            NULL, error_code,
-            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-            (LPTSTR) &error_string, 0, NULL);
-
     fprintf(stderr,
-            "process_easy: DuplicateHandle(In) failed (e=%d, '%s')\n",
-            error_code, error_string);
-    LocalFree(error_string);
-
+            "process_easy: DuplicateHandle(In) failed (e=%d)\n",
+            GetLastError());
     return INVALID_HANDLE_VALUE;
   }
   if (DuplicateHandle(GetCurrentProcess(),

reply via email to

[Prev in Thread] Current Thread [Next in Thread]