diff --git a/server/process.c b/server/process.c index 393a65ad4a..c119ed1678 100644 --- a/server/process.c +++ b/server/process.c @@ -660,7 +660,7 @@ void kill_process( struct process *process, struct thread *skip, int exit_code ) { 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 ); } } diff --git a/server/request.c b/server/request.c index 7eb1f83390..6f0ffb9f50 100644 --- a/server/request.c +++ b/server/request.c @@ -389,11 +389,14 @@ int receive_fd( struct process *process ) return 0; } - if (ret >= 0) + if (!ret) { - if (ret > 0) - fprintf( stderr, "Protocol error: process %p: partial recvmsg %d for fd\n", - process, ret ); + kill_process( process, NULL, 0 ); + } + else if (ret > 0) + { + fprintf( stderr, "Protocol error: process %p: partial recvmsg %d for fd\n", + process, ret ); kill_process( process, NULL, 1 ); } else