* 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>).
This commit is contained in:
		| @@ -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> | Tue Oct 17 14:50:31 2000  Christopher Faylor <cgf@cygnus.com> | ||||||
|  |  | ||||||
| 	* sigproc.cc (proc_subproc): Remove unneeded test for correct process | 	* sigproc.cc (proc_subproc): Remove unneeded test for correct process | ||||||
|   | |||||||
| @@ -113,11 +113,12 @@ posify (char **here, const char *value) | |||||||
| { | { | ||||||
|   char *src = *here; |   char *src = *here; | ||||||
|   win_env *conv; |   win_env *conv; | ||||||
|   int len = strcspn (src, "=") + 1; |  | ||||||
|  |  | ||||||
|   if (!(conv = getwinenv (src))) |   if (!(conv = getwinenv (src))) | ||||||
|     return; |     return; | ||||||
|  |  | ||||||
|  |   int len = strcspn (src, "=") + 1; | ||||||
|  |  | ||||||
|   /* Turn all the items from c:<foo>;<bar> into their |   /* Turn all the items from c:<foo>;<bar> into their | ||||||
|      mounted equivalents - if there is one.  */ |      mounted equivalents - if there is one.  */ | ||||||
|  |  | ||||||
|   | |||||||
| @@ -216,7 +216,7 @@ public: | |||||||
|  |  | ||||||
| /* This is the main stack frame info for this process. */ | /* This is the main stack frame info for this process. */ | ||||||
| static NO_COPY stack_info thestack; | static NO_COPY stack_info thestack; | ||||||
| signal_dispatch sigsave; | static signal_dispatch sigsave; | ||||||
|  |  | ||||||
| /* Initialize everything needed to start iterating. */ | /* Initialize everything needed to start iterating. */ | ||||||
| void | void | ||||||
| @@ -711,6 +711,9 @@ call_handler (int sig, struct sigaction& siga, void *handler) | |||||||
|  |  | ||||||
|   mainthread.lock->acquire (); |   mainthread.lock->acquire (); | ||||||
|  |  | ||||||
|  |   if (sigsave.sig) | ||||||
|  |     goto set_pending; | ||||||
|  |  | ||||||
|   if (mainthread.frame) |   if (mainthread.frame) | ||||||
|     { |     { | ||||||
|       ebp = mainthread.frame; |       ebp = mainthread.frame; | ||||||
|   | |||||||
| @@ -1195,7 +1195,7 @@ wait_sig (VOID *) | |||||||
| 	  continue; | 	  continue; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|       if (saw_sigchld && !dispatched_sigchld) |       if (nzombies && saw_sigchld && !dispatched_sigchld) | ||||||
| 	proc_subproc (PROC_CLEARWAIT, 0); | 	proc_subproc (PROC_CLEARWAIT, 0); | ||||||
|       /* Signal completion of signal handling depending on which semaphore |       /* Signal completion of signal handling depending on which semaphore | ||||||
|        * woke up the WaitForMultipleObjects above. |        * woke up the WaitForMultipleObjects above. | ||||||
|   | |||||||
| @@ -212,7 +212,7 @@ _read (int fd, void *ptr, size_t len) | |||||||
|       return -1; |       return -1; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   set_sig_errno (0); |   // set_sig_errno (0); | ||||||
|   fhandler_base *fh = fdtab[fd]; |   fhandler_base *fh = fdtab[fd]; | ||||||
|   DWORD wait = (fh->get_flags () & (O_NONBLOCK | OLD_O_NDELAY)) ? 0 : INFINITE; |   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)) |   else if (!fh->ready_for_read (fd, wait, 0)) | ||||||
|     { |     { | ||||||
|       if (!wait) |       if (!wait) | ||||||
| 	set_sig_errno (EAGAIN); | 	set_sig_errno (EAGAIN);	/* Don't really need 'set_sig_errno' here, but... */ | ||||||
|       else |       else | ||||||
| 	set_sig_errno (EINTR); | 	set_sig_errno (EINTR); | ||||||
|       res = -1; |       res = -1; | ||||||
|   | |||||||
| @@ -16,8 +16,9 @@ details. */ | |||||||
|  |  | ||||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||||
|  |  | ||||||
| #define alloca(x) __builtin_alloca (x) | #define alloca __builtin_alloca | ||||||
| #define strlen __builtin_strlen | #define strlen __builtin_strlen | ||||||
|  | #define strcmp __builtin_strcmp | ||||||
| #define strcpy __builtin_strcpy | #define strcpy __builtin_strcpy | ||||||
| #define memcpy __builtin_memcpy | #define memcpy __builtin_memcpy | ||||||
| #define memcmp __builtin_memcmp | #define memcmp __builtin_memcmp | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user