* fhandler_tty.cc (fhandler_tty_slave::init): Revert 2001-06-16 change.

* fork.cc (fork_copy): Print more debugging info.
(fork_parent): Change order of arguments to accomdate buggy gcc.
(fork): Ditto.
* syscalls.cc (_unlink): Reorganize to try harder to delete file with
DeleteFile and to recover more gracefully if FILE_FLAG_DELETE_ON_CLOSE doesn't
work properly.
This commit is contained in:
Christopher Faylor
2001-06-18 21:18:59 +00:00
parent 36623e6535
commit 20a2c44362
4 changed files with 104 additions and 69 deletions

View File

@ -104,8 +104,8 @@ fork_copy (PROCESS_INFORMATION &pi, const char *what, ...)
__seterrno ();
/* If this happens then there is a bug in our fork
implementation somewhere. */
system_printf ("%s pass %d failed, %p..%p, done %d, %E",
what, pass, low, high, done);
system_printf ("%s pass %d failed, %p..%p, done %d, windows pid %u, %E",
what, pass, low, high, done, pi.dwProcessId);
goto err;
}
}
@ -340,8 +340,8 @@ slow_pid_reuse (HANDLE h)
}
static int __stdcall
fork_parent (void *stack_here, HANDLE& hParent, dll *&first_dll,
bool& load_dlls, child_info_fork &ch)
fork_parent (HANDLE& hParent, dll *&first_dll,
bool& load_dlls, void *stack_here, child_info_fork &ch)
{
HANDLE subproc_ready, forker_finished;
DWORD rc;
@ -646,7 +646,7 @@ fork ()
}
void *esp;
__asm ("movl %%esp,%0": "=r" (esp));
__asm__ volatile ("movl %%esp,%0": "=r" (esp));
myself->set_has_pgid_children ();
@ -657,7 +657,7 @@ fork ()
if (res)
res = fork_child (grouped.hParent, grouped.first_dll, grouped.load_dlls);
else
res = fork_parent (esp, grouped.hParent, grouped.first_dll, grouped.load_dlls, ch);
res = fork_parent (grouped.hParent, grouped.first_dll, grouped.load_dlls, esp, ch);
MALLOC_CHECK;
syscall_printf ("%d = fork()", res);