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>2000-10-18 08:53:37 +0400
committerChristopher Faylor <me@cgf.cx>2000-10-18 08:53:37 +0400
commitac944e37d029c8bc9e38a51be76fece99a2826f1 (patch)
tree26faad099a731a19876502ed4b278a6bd43bcda7
parent3f7bd531155175f7c8158b68fcaf9e1aa98f9c1d (diff)
* exceptions.cc (call_handler): Make signal pending if sigsave.sig is still
active. * syscalls.cc (_read): Don't clear errno. * sigproc.cc (wait_sig): Don't scan the waiting process list after a SIGCHLD if there are no zombies to reap. * winsup.h: Use __builtin_strcmp. * environ.cc (posify): Don't initialize len unless it is required (from DJ Delorie <dj@redhat.com>).
-rw-r--r--winsup/cygwin/ChangeLog11
-rw-r--r--winsup/cygwin/environ.cc3
-rw-r--r--winsup/cygwin/exceptions.cc5
-rw-r--r--winsup/cygwin/sigproc.cc2
-rw-r--r--winsup/cygwin/syscalls.cc4
-rw-r--r--winsup/cygwin/winsup.h3
6 files changed, 22 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ec7dc2e2f..4214ab7af 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,14 @@
+Wed Oct 18 00:48:49 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * exceptions.cc (call_handler): Make signal pending if sigsave.sig is
+ still active.
+ * syscalls.cc (_read): Don't clear errno.
+ * sigproc.cc (wait_sig): Don't scan the waiting process list after a
+ SIGCHLD if there are no zombies to reap.
+ * winsup.h: Use __builtin_strcmp.
+ * environ.cc (posify): Don't initialize len unless it is required
+ (from DJ Delorie <dj@redhat.com>).
+
Tue Oct 17 14:50:31 2000 Christopher Faylor <cgf@cygnus.com>
* sigproc.cc (proc_subproc): Remove unneeded test for correct process
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 612e7e13e..31f87ad2d 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -113,11 +113,12 @@ posify (char **here, const char *value)
{
char *src = *here;
win_env *conv;
- int len = strcspn (src, "=") + 1;
if (!(conv = getwinenv (src)))
return;
+ int len = strcspn (src, "=") + 1;
+
/* Turn all the items from c:<foo>;<bar> into their
mounted equivalents - if there is one. */
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 75ad01c67..c4b87f0ec 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -216,7 +216,7 @@ public:
/* This is the main stack frame info for this process. */
static NO_COPY stack_info thestack;
-signal_dispatch sigsave;
+static signal_dispatch sigsave;
/* Initialize everything needed to start iterating. */
void
@@ -711,6 +711,9 @@ call_handler (int sig, struct sigaction& siga, void *handler)
mainthread.lock->acquire ();
+ if (sigsave.sig)
+ goto set_pending;
+
if (mainthread.frame)
{
ebp = mainthread.frame;
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index d98bd0e11..84279610e 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -1195,7 +1195,7 @@ wait_sig (VOID *)
continue;
}
- if (saw_sigchld && !dispatched_sigchld)
+ if (nzombies && saw_sigchld && !dispatched_sigchld)
proc_subproc (PROC_CLEARWAIT, 0);
/* Signal completion of signal handling depending on which semaphore
* woke up the WaitForMultipleObjects above.
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index a9b926b97..adbe286a7 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -212,7 +212,7 @@ _read (int fd, void *ptr, size_t len)
return -1;
}
- set_sig_errno (0);
+ // set_sig_errno (0);
fhandler_base *fh = fdtab[fd];
DWORD wait = (fh->get_flags () & (O_NONBLOCK | OLD_O_NDELAY)) ? 0 : INFINITE;
@@ -225,7 +225,7 @@ _read (int fd, void *ptr, size_t len)
else if (!fh->ready_for_read (fd, wait, 0))
{
if (!wait)
- set_sig_errno (EAGAIN);
+ set_sig_errno (EAGAIN); /* Don't really need 'set_sig_errno' here, but... */
else
set_sig_errno (EINTR);
res = -1;
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index bd1fd9b12..6513a4078 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -16,8 +16,9 @@ details. */
#ifdef __cplusplus
-#define alloca(x) __builtin_alloca (x)
+#define alloca __builtin_alloca
#define strlen __builtin_strlen
+#define strcmp __builtin_strcmp
#define strcpy __builtin_strcpy
#define memcpy __builtin_memcpy
#define memcmp __builtin_memcmp