GetExitCodeProcess always returns 1

Igor Sysoev is at rambler-co.ru
Fri Mar 24 14:06:06 CST 2006


On Thu, 23 Mar 2006, Igor Sysoev wrote:

> 3 years ago I reported that on FreeBSD Wine-20030508's
> GetExitCodeProcess() always returns 1:
> http://www.winehq.org/hypermail/wine-devel/2003/06/0100.html
> This report included a small test case.
>
> It was fixed by patch:
> http://www.winehq.org/hypermail/wine-devel/2003/06/0381.html
>
> and I used the patched Wine-20030508 to run MSVC,
> OpenWatcom C, and Borland C in a command line.
>
> Recenty I build Wine-0.9.10 from ports on FreeBSD 6.1, but
> GetExitCodeProcess() still always returns 1.

The attached patch is the same patch but for Wine-0.9.10.
I've tested it on FreeBSD 6.1.


Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
--- server/process.c	Wed Mar 15 17:50:50 2006
+++ server/process.c	Fri Mar 24 21:44:28 2006
@@ -660,7 +660,7 @@ void kill_process( struct process *proce
     {
         struct thread *thread = LIST_ENTRY( ptr, struct thread, proc_entry );
 
-        thread->exit_code = exit_code;
+        if (exit_code) thread->exit_code = exit_code;
         if (thread != skip) kill_thread( thread, 1 );
     }
 }
--- server/request.c	Wed Mar 15 17:50:50 2006
+++ server/request.c	Fri Mar 24 21:45:38 2006
@@ -397,7 +397,7 @@ int receive_fd( struct process *process 
         if (ret > 0)
             fprintf( stderr, "Protocol error: process %p: partial recvmsg %d for fd\n",
                      process, ret );
-        kill_process( process, NULL, 1 );
+        kill_process( process, NULL, (ret > 0) );
     }
     else
     {


More information about the wine-devel mailing list