Temporary hack to share handles between processes sharing the same
address space.
diff --git a/scheduler/process.c b/scheduler/process.c
index aa460cd..284aae7 100644
--- a/scheduler/process.c
+++ b/scheduler/process.c
@@ -517,7 +517,7 @@
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;
diff --git a/server/process.c b/server/process.c
index da9d84c..6368d23 100644
--- a/server/process.c
+++ b/server/process.c
@@ -169,15 +169,14 @@
/* 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)
{