Temporary hack to share handles between processes sharing the same

address space.
This commit is contained in:
Alexandre Julliard 2000-04-08 21:02:47 +00:00
parent 416a00d2bc
commit 11342151c9
2 changed files with 4 additions and 5 deletions

View File

@ -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;

View File

@ -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)
{