The CreateProcess function sets a lpProcessInformation field. This field is set when a Windows process is called, but erased when a Unix binary (e.g. /bin/sleep 2) is called, so the hprocess handle is unknown. Is there a way to obtain this process handle so that GetExitCodeProcess can be called? I basically want to know when the called process has exited.
Thanks
CreateProcess for Unix binaries
Re: CreateProcess for Unix binaries
Native *NIX processes won't have process handle - they are run outside Wine.yves.surrel wrote:The CreateProcess function sets a lpProcessInformation field. This field is set when a Windows process is called, but erased when a Unix binary (e.g. /bin/sleep 2) is called, so the hprocess handle is unknown. Is there a way to obtain this process handle so that GetExitCodeProcess can be called? I basically want to know when the called process has exited.
The only thing you can use is a standard UNIX mechanism - get PID of the child process then do waitpid() on it. Of course for that you need winelib app so it can call system's waitpid() and not Wine'a msvcrt one.