* 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:
parent
a3a9aac72d
commit
150f3bd168
@ -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>
|
2005-09-15 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* sigproc.cc (wait_sig): Reorganize exit case so that ExitProcess is
|
* sigproc.cc (wait_sig): Reorganize exit case so that ExitProcess is
|
||||||
|
@ -59,7 +59,7 @@ cygheap_fixup_in_child (bool execed)
|
|||||||
cygheap_max = child_proc_info->cygheap;
|
cygheap_max = child_proc_info->cygheap;
|
||||||
cygheap = (init_cygheap *) cygheap_max;
|
cygheap = (init_cygheap *) cygheap_max;
|
||||||
_csbrk ((char *) child_proc_info->cygheap_max - (char *) cygheap);
|
_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 ();
|
cygheap_init ();
|
||||||
debug_fixup_after_fork_exec ();
|
debug_fixup_after_fork_exec ();
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ stack_base (child_info_fork &ch)
|
|||||||
The result is a boolean indicating success. */
|
The result is a boolean indicating success. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fork_copy (PROCESS_INFORMATION &pi, const char *what, ...)
|
fork_copy (PROCESS_INFORMATION& pi, const char *what, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
char *low;
|
char *low;
|
||||||
|
@ -38,7 +38,7 @@ details. */
|
|||||||
#define WSSC 60000 // Wait for signal completion
|
#define WSSC 60000 // Wait for signal completion
|
||||||
#define WPSP 40000 // Wait for proc_subproc mutex
|
#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
|
#define NPROCS 256
|
||||||
|
|
||||||
@ -1127,7 +1127,7 @@ wait_sig (VOID *self)
|
|||||||
|
|
||||||
HANDLE h = hMainThread;
|
HANDLE h = hMainThread;
|
||||||
my_sendsig = hMainThread = NULL;
|
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;
|
DWORD exitcode = 1;
|
||||||
|
|
||||||
|
@ -1020,15 +1020,6 @@ av::fixup (child_info_types chtype, const char *prog_arg, path_conv& real_path,
|
|||||||
bool exeext = strcasematch (ext, ".exe");
|
bool exeext = strcasematch (ext, ".exe");
|
||||||
if (exeext && real_path.iscygexec ())
|
if (exeext && real_path.iscygexec ())
|
||||||
return 0;
|
return 0;
|
||||||
char *buf = NULL;
|
|
||||||
myfault efault;
|
|
||||||
if (efault.faulted ())
|
|
||||||
{
|
|
||||||
if (buf)
|
|
||||||
UnmapViewOfFile (buf);
|
|
||||||
real_path.set_cygexec (false);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
HANDLE h = CreateFile (real_path, GENERIC_READ,
|
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);
|
CloseHandle (h);
|
||||||
if (!hm)
|
if (!hm)
|
||||||
goto err;
|
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);
|
CloseHandle (hm);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
goto err;
|
goto err;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user