http://bugs.winehq.org/show_bug.cgi?id=18335
Summary: CreateProcess doesn't set hProcess correctly when starting a Linux program Product: Wine Version: 1.1.20 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: dima@gmail.com
Created an attachment (id=20876) --> (http://bugs.winehq.org/attachment.cgi?id=20876) test case
When CreateProcess starts a Linux program, it sets hProcess to 0 - causing WaitForSingleObject to fail.
To test this: Get CreateProcess example from MSDN: http://msdn.microsoft.com/en-us/library/ms682512(VS.85).aspx Add a few lines to print out the value of pi.hProcess and the return value of WaitForSingleObject. (I'll attach the code).
Run it with an argument "C:/windows/system32/notepad": hProcess is non-zero, and WaitForSingleObject succeeds. Then run it with an argument "/usr/bin/ls": "ls" still runs, but hProcess is 0 and WaitForSingleObject returns -1.