X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/50b8cf60325f92026d3fc768a433a5579c642df2..9ab714c7b06a04e38d5d26b3beef45f138365b40:/src/sysdep.c diff --git a/src/sysdep.c b/src/sysdep.c index 15a0da9719..167b9c398a 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -339,6 +339,15 @@ wait_for_termination (pid) break; wait (0); #else /* neither BSD nor UNIPLUS nor LINUX: random sysV */ +#ifdef POSIX_SIGNALS /* would this work for LINUX as well? */ + sigblock (sigmask (SIGCHLD)); + if (0 > kill (pid, 0)) + { + sigunblock (sigmask (SIGCHLD)); + break; + } + sigpause (sigmask (SIGCHLD)); +#else /* not POSIX_SIGNALS */ #ifdef HAVE_SYSV_SIGPAUSE sighold (SIGCHLD); if (0 > kill (pid, 0)) @@ -355,6 +364,7 @@ wait_for_termination (pid) we lose just one second. */ sleep (1); #endif /* not HAVE_SYSV_SIGPAUSE */ +#endif /* not POSIX_SIGNALS */ #endif /* not UNIPLUS */ #endif /* not BSD, and not HPUX version >= 6 */ #endif /* not VMS */ @@ -2113,7 +2123,7 @@ sys_signal (int signal_number, signal_handler_t action) #else sigemptyset (&new_action.sa_mask); new_action.sa_handler = action; - new_action.sa_flags = NULL; + new_action.sa_flags = 0; sigaction (signal_number, &new_action, &old_action); return (old_action.sa_handler); #endif /* DGUX */ @@ -2533,7 +2543,7 @@ char *sys_siglist[NSIG + 1] = #endif /* not AIX */ 0 }; -#endif HAVE_SYS_SIGLIST +#endif /* HAVE_SYS_SIGLIST */ /* * Warning, this function may not duplicate 4.2 action properly @@ -2704,7 +2714,8 @@ gettimeofday (tp, tzp) tp->tv_sec = time ((long *)0); tp->tv_usec = 0; - tzp->tz_minuteswest = -1; + if (tzp != 0) + tzp->tz_minuteswest = -1; } #endif