* sigproc.cc (no_signals_available): Return true if sending to self from the

signal thread.
(wait_sig): Correct so that WaitForSingleObject is called when hMainThread is
!= 0, rather than the reverse.
* cygheap.cc (cygheap_fixup_in_child): Clarify potential error message.
* fork.cc (fork_copy): Cosmetic change.
This commit is contained in:
Christopher Faylor 2005-09-16 01:47:09 +00:00
parent a3a9aac72d
commit 150f3bd168
5 changed files with 16 additions and 14 deletions

View File

@ -1,3 +1,14 @@
2005-09-15 Christopher Faylor <cgf@timesys.com>
* sigproc.cc (no_signals_available): Return true if sending to self
from the signal thread.
(wait_sig): Correct so that WaitForSingleObject is called when
hMainThread is != 0, rather than the reverse.
* cygheap.cc (cygheap_fixup_in_child): Clarify potential error message.
* fork.cc (fork_copy): Cosmetic change.
2005-09-15 Christopher Faylor <cgf@timesys.com>
* sigproc.cc (wait_sig): Reorganize exit case so that ExitProcess is

View File

@ -59,7 +59,7 @@ cygheap_fixup_in_child (bool execed)
cygheap_max = child_proc_info->cygheap;
cygheap = (init_cygheap *) cygheap_max;
_csbrk ((char *) child_proc_info->cygheap_max - (char *) cygheap);
child_copy (child_proc_info->parent, child_proc_info->dwProcessId, "cygheap", cygheap, cygheap_max);
child_copy (child_proc_info->parent, child_proc_info->dwProcessId, "cygheap for exec", cygheap, cygheap_max);
cygheap_init ();
debug_fixup_after_fork_exec ();

View File

@ -62,7 +62,7 @@ stack_base (child_info_fork &ch)
The result is a boolean indicating success. */
static int
fork_copy (PROCESS_INFORMATION &pi, const char *what, ...)
fork_copy (PROCESS_INFORMATION& pi, const char *what, ...)
{
va_list args;
char *low;

View File

@ -38,7 +38,7 @@ details. */
#define WSSC 60000 // Wait for signal completion
#define WPSP 40000 // Wait for proc_subproc mutex
#define no_signals_available() (!hwait_sig || (myself->exitcode & EXITCODE_SET) && !my_sendsig)
#define no_signals_available() (!hwait_sig || (myself->exitcode & EXITCODE_SET) || !my_sendsig || &_my_tls == _sig_tls)
#define NPROCS 256
@ -1127,7 +1127,7 @@ wait_sig (VOID *self)
HANDLE h = hMainThread;
my_sendsig = hMainThread = NULL;
DWORD res = h ? WAIT_OBJECT_0 : WaitForSingleObject (h, INFINITE);
DWORD res = !h ? WAIT_OBJECT_0 : WaitForSingleObject (h, INFINITE);
DWORD exitcode = 1;

View File

@ -1020,15 +1020,6 @@ av::fixup (child_info_types chtype, const char *prog_arg, path_conv& real_path,
bool exeext = strcasematch (ext, ".exe");
if (exeext && real_path.iscygexec ())
return 0;
char *buf = NULL;
myfault efault;
if (efault.faulted ())
{
if (buf)
UnmapViewOfFile (buf);
real_path.set_cygexec (false);
return 0;
}
while (1)
{
HANDLE h = CreateFile (real_path, GENERIC_READ,
@ -1042,7 +1033,7 @@ av::fixup (child_info_types chtype, const char *prog_arg, path_conv& real_path,
CloseHandle (h);
if (!hm)
goto err;
buf = (char *) MapViewOfFile(hm, FILE_MAP_READ, 0, 0, 0);
char *buf = (char *) MapViewOfFile(hm, FILE_MAP_READ, 0, 0, 0);
CloseHandle (hm);
if (!buf)
goto err;