server: Fix process trace_data initialization race on Mac.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6bab6ce8e1
commit
9fa65a8751
|
@ -1419,9 +1419,6 @@ void server_init_process(void)
|
|||
"Or maybe the wrong wineserver is still running?\n",
|
||||
version, SERVER_PROTOCOL_VERSION,
|
||||
(version > SERVER_PROTOCOL_VERSION) ? "wine" : "wineserver" );
|
||||
#ifdef __APPLE__
|
||||
send_server_task_port();
|
||||
#endif
|
||||
#if defined(__linux__) && defined(HAVE_PRCTL)
|
||||
/* work around Ubuntu's ptrace breakage */
|
||||
if (server_pid != -1) prctl( 0x59616d61 /* PR_SET_PTRACER */, server_pid );
|
||||
|
@ -1440,6 +1437,10 @@ void server_init_process_done(void)
|
|||
NTSTATUS status;
|
||||
int suspend;
|
||||
|
||||
#ifdef __APPLE__
|
||||
send_server_task_port();
|
||||
#endif
|
||||
|
||||
/* Install signal handlers; this cannot be done earlier, since we cannot
|
||||
* send exceptions to the debugger before the create process event that
|
||||
* is sent by REQ_INIT_PROCESS_DONE.
|
||||
|
|
|
@ -587,7 +587,6 @@ data_size_t init_process( struct thread *thread )
|
|||
struct process *process = thread->process;
|
||||
struct startup_info *info = process->startup_info;
|
||||
|
||||
init_process_tracing( process );
|
||||
if (!info) return 0;
|
||||
return info->data_size;
|
||||
}
|
||||
|
@ -1319,6 +1318,7 @@ DECL_HANDLER(init_process_done)
|
|||
if (process->exe_file) release_object( process->exe_file );
|
||||
process->exe_file = NULL;
|
||||
|
||||
init_process_tracing( process );
|
||||
generate_startup_debug_events( process, req->entry );
|
||||
set_process_startup_state( process, STARTUP_DONE );
|
||||
|
||||
|
|
Loading…
Reference in New Issue