Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-09-16 05:47:09 +0400
committerChristopher Faylor <me@cgf.cx>2005-09-16 05:47:09 +0400
commit150f3bd16864bfb1a8ab10904924fcee7feeb621 (patch)
tree2abfee9cba967c6227d2391575f19210ecd6ade1 /winsup/cygwin
parenta3a9aac72d82414427d0f020b74a12c26905426c (diff)
* 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.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog11
-rw-r--r--winsup/cygwin/cygheap.cc2
-rw-r--r--winsup/cygwin/fork.cc2
-rw-r--r--winsup/cygwin/sigproc.cc4
-rw-r--r--winsup/cygwin/spawn.cc11
5 files changed, 16 insertions, 14 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 2ab99a577..6212001dd 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,16 @@
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
always called, since that is the intent of sending a __SIGEXIT. Wait
forever for main thread to go away since, presumably, the main thread
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index 6cbdf6ef7..fff2ad0d2 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -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 ();
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index f16eabc32..92e27aa78 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -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;
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index ede777fb8..af87e1e02 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -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;
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 73c148e24..ffafa8f7c 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -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;