]> sourceware.org Git - newlib-cygwin.git/commitdiff
* exceptions.cc (call_handler): Make signal pending if sigsave.sig is still
authorChristopher Faylor <me@cgf.cx>
Wed, 18 Oct 2000 04:53:37 +0000 (04:53 +0000)
committerChristopher Faylor <me@cgf.cx>
Wed, 18 Oct 2000 04:53:37 +0000 (04:53 +0000)
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>).

winsup/cygwin/ChangeLog
winsup/cygwin/environ.cc
winsup/cygwin/exceptions.cc
winsup/cygwin/sigproc.cc
winsup/cygwin/syscalls.cc
winsup/cygwin/winsup.h

index ec7dc2e2f5d64afcd484d1143720d4e853f89922..4214ab7af878eac7f8385a45094f255a7132522e 100644 (file)
@@ -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
index 612e7e13e8b2b043328dba19969be92651112db9..31f87ad2d89395ab0dc68924dabe038bf7c7ea24 100644 (file)
@@ -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.  */
 
index 75ad01c675cb8c21f7ee2d8c29903decf6fdffd5..c4b87f0ec37ea187ff492ea0f61c6858aac2a856 100644 (file)
@@ -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;
index d98bd0e114953eea32671c6e00bdef6b0a7f9ea6..84279610eeda695766f524a2abc97bdece75700c 100644 (file)
@@ -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.
index a9b926b975ea7d4554b2c6ca06caa98fcd86d4f1..adbe286a74544bbc218ce626fd4b50cbf8344da1 100644 (file)
@@ -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;
index bd1fd9b1243edb17b04648f2e7cfcc9a6bd85e73..6513a4078ad02dfc58840f90593dc09b978ad711 100644 (file)
@@ -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
This page took 0.044129 seconds and 5 git commands to generate.