From 20a2c4436224db8bf0b9dd47c58749a36a1dfc17 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 18 Jun 2001 21:18:59 +0000 Subject: * 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. --- winsup/cygwin/fork.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin/fork.cc') diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 651d935a3..b44855497 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -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); -- cgit v1.2.3