* linux-low.c (linux_kill): Handle being called with no threads.

* win32-i386-low.c (win32_kill): Likewise.
	(get_child_debug_event): Clear current_process_handle.
This commit is contained in:
Daniel Jacobowitz
2007-01-03 17:57:16 +00:00
parent 61a771aa2e
commit 9d6063994f
3 changed files with 17 additions and 2 deletions

View File

@@ -582,6 +582,9 @@ win32_attach (unsigned long pid)
static void
win32_kill (void)
{
if (current_process_handle == NULL)
return;
TerminateProcess (current_process_handle, 0);
for (;;)
{
@@ -901,6 +904,7 @@ in:
ourstatus->kind = TARGET_WAITKIND_EXITED;
ourstatus->value.integer = current_event.u.ExitProcess.dwExitCode;
CloseHandle (current_process_handle);
current_process_handle = NULL;
retval = main_thread_id;
break;