creation and DLL load.
(child_create_inferior): Close unneeded process/thread handle after thread
creation.
+2001-10-10 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (get_child_debug_event): Close file handles created after
+ process creation and DLL load.
+ (child_create_inferior): Close unneeded process/thread handle after
+ thread creation.
+
2001-10-10 Jim Blandy <jimb@redhat.com>
* mn10300-tdep.c (mn10300_analyze_prologue): Doc fixes.
(unsigned) current_event.dwProcessId,
(unsigned) current_event.dwThreadId,
"CREATE_PROCESS_DEBUG_EVENT"));
+ CloseHandle (current_event.u.CreateProcessInfo.hFile);
current_process_handle = current_event.u.CreateProcessInfo.hProcess;
main_thread_id = current_event.dwThreadId;
(unsigned) current_event.dwProcessId,
(unsigned) current_event.dwThreadId,
"LOAD_DLL_DEBUG_EVENT"));
+ CloseHandle (current_event.u.LoadDll.hFile);
catch_errors (handle_load_dll, NULL, (char *) "", RETURN_MASK_ALL);
registers_changed (); /* mark all regs invalid */
ourstatus->kind = TARGET_WAITKIND_LOADED;
if (!ret)
error ("Error creating process %s, (error %d)\n", exec_file, GetLastError ());
+ CloseHandle (pi.hThread);
+ CloseHandle (pi.hProcess);
do_initial_child_stuff (pi.dwProcessId);
/* child_continue (DBG_CONTINUE, -1); */
(unsigned) current_event.dwProcessId,
(unsigned) current_event.dwThreadId,
"CREATE_PROCESS_DEBUG_EVENT"));
+ CloseHandle (current_event.u.CreateProcessInfo.hFile);
current_process_handle = current_event.u.CreateProcessInfo.hProcess;
main_thread_id = current_event.dwThreadId;
(unsigned) current_event.dwProcessId,
(unsigned) current_event.dwThreadId,
"LOAD_DLL_DEBUG_EVENT"));
+ CloseHandle (current_event.u.LoadDll.hFile);
catch_errors (handle_load_dll, NULL, (char *) "", RETURN_MASK_ALL);
registers_changed (); /* mark all regs invalid */
ourstatus->kind = TARGET_WAITKIND_LOADED;
if (!ret)
error ("Error creating process %s, (error %d)\n", exec_file, GetLastError ());
+ CloseHandle (pi.hThread);
+ CloseHandle (pi.hProcess);
do_initial_child_stuff (pi.dwProcessId);
/* child_continue (DBG_CONTINUE, -1); */