Commit 4fd8bab9 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Inherit the process affinity from the parent process.

parent baa04014
...@@ -320,7 +320,6 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit ...@@ -320,7 +320,6 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
process->exit_code = STILL_ACTIVE; process->exit_code = STILL_ACTIVE;
process->running_threads = 0; process->running_threads = 0;
process->priority = PROCESS_PRIOCLASS_NORMAL; process->priority = PROCESS_PRIOCLASS_NORMAL;
process->affinity = ~0;
process->suspend = 0; process->suspend = 0;
process->is_system = 0; process->is_system = 0;
process->create_flags = 0; process->create_flags = 0;
...@@ -355,6 +354,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit ...@@ -355,6 +354,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
{ {
process->handles = alloc_handle_table( process, 0 ); process->handles = alloc_handle_table( process, 0 );
process->token = token_create_admin(); process->token = token_create_admin();
process->affinity = ~0;
} }
else else
{ {
...@@ -365,6 +365,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit ...@@ -365,6 +365,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
/* Note: for security reasons, starting a new process does not attempt /* Note: for security reasons, starting a new process does not attempt
* to use the current impersonation token for the new process */ * to use the current impersonation token for the new process */
process->token = token_duplicate( parent->token, TRUE, 0 ); process->token = token_duplicate( parent->token, TRUE, 0 );
process->affinity = parent->affinity;
} }
if (!process->handles || !process->token) goto error; if (!process->handles || !process->token) goto error;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment