From 93d606f60aed779c555017828656c8a4e3c9c6a9 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 27 Mar 2008 01:50:40 +0000 Subject: * hookapi.cc (find_first_notloaded_dll): New function. * pinfo.cc (status_exit): New function. Issue message when dll not found. Use find_first_notloaded_dll to find a nonexistent dll. (pinfo::maybe_set_exit_code_from_windows): Call status_exit when exit code >= 0xc0000000UL. * sigproc.cc (child_info::proc_retry): Return exit code when STATUS_DLL_NOT_FOUND. * spawn.cc (spawn_guts): Minor cleanup. * syscalls.cc (close_all_files): Don't actually close stderr filehandle. Just make it noninheritable. * winsup.h (find_first_notloaded_dll): Declare new function. * ntdll.h: Add several missing NTSTATUS defines. --- winsup/cygwin/spawn.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/spawn.cc') diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index cb5af8017..2b728b0c4 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -1,7 +1,7 @@ /* spawn.cc Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007 Red Hat, Inc. + 2005, 2006, 2007, 2008 Red Hat, Inc. This file is part of Cygwin. @@ -265,7 +265,7 @@ do_cleanup (void *args) int __stdcall -spawn_guts (const char * prog_arg, const char *const *argv, +spawn_guts (const char *prog_arg, const char *const *argv, const char *const envp[], int mode, int __stdin, int __stdout) { bool rc; @@ -745,8 +745,7 @@ loop: myself->wr_proc_pipe_owner = GetCurrentProcessId (); myself->wr_proc_pipe = orig_wr_proc_pipe; } - DWORD res = ch.proc_retry (pi.hProcess); - if (!res) + if (!ch.proc_retry (pi.hProcess)) { looped++; goto loop; -- cgit v1.2.3