GetExitCodeProcess always returns 1 on FreeBSD

Igor Sysoev is at rambler-co.ru
Sat Mar 25 01:38:40 CST 2006


The attached patch fixes the bug on FreeBSD when GetExitCodeProcess()
always returns 1. It is the same as patch from
http://www.winehq.org/hypermail/wine-devel/2003/06/0381.html
but for Wine-0.9.10.

It was tested 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-patches mailing list