Commit 11342151 authored by Alexandre Julliard's avatar Alexandre Julliard

Temporary hack to share handles between processes sharing the same

address space.
parent 416a00d2
......@@ -517,7 +517,7 @@ PDB *PROCESS_Create( NE_MODULE *pModule, HFILE hFile, LPCSTR cmd_line, LPCSTR en
req->pinherit = (psa && (psa->nLength >= sizeof(*psa)) && psa->bInheritHandle);
req->tinherit = (tsa && (tsa->nLength >= sizeof(*tsa)) && tsa->bInheritHandle);
req->inherit_all = inherit;
req->inherit_all = 2 /*inherit*/; /* HACK! */
req->create_flags = flags;
req->start_flags = startup->dwFlags;
req->exe_file = hFile;
......
......@@ -169,15 +169,14 @@ struct thread *create_process( int fd, struct process *parent,
/* copy the request structure */
if (!set_creation_info( process, req, cmd_line, len )) goto error;
if (process->info->inherit_all)
if (process->info->inherit_all == 2) /* HACK! */
process->handles = grab_object( parent->handles );
else if (process->info->inherit_all)
process->handles = copy_handle_table( process, parent );
else
process->handles = alloc_handle_table( process, 0 );
if (!process->handles) goto error;
/* alloc a handle for the process itself */
alloc_handle( process, process, PROCESS_ALL_ACCESS, 0 );
/* retrieve the main exe file */
if (process->info->exe_file != -1)
{
......
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