[Wine] Re: CreateProcess for Unix binaries

vitamin wineforum-user at winehq.org
Wed Dec 17 08:38:06 CST 2008

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.

Native *NIX processes won't have process handle - they are run outside Wine.

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.

More information about the wine-users mailing list