server: Fixed process exit code on FreeBSD.
This commit is contained in:
parent
68f8d28945
commit
0a3646292a
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue