Mercurial > emacs
comparison src/process.c @ 107460:c3852852bbc0
Remove dead code dealing with POSIX_SIGNALS.
* atimer.c (set_alarm): Remove dead code, all USG systems define
POSIX_SIGNALS.
* data.c (arith_error): Likewise.
* keyboard.c (input_available_signal, handle_user_signal)
(interrupt_signal): Likewise.
* process.c (sigchld_handler): Likewise.
(create_process): Remove if 0 code. Remove HPUX conditional when
!defined (POSIX_SIGNALS), it cannot be true.
* syssignal.h: Remove USG5_4 and USG conditionals when
!POSIX_SIGNALS, they cannot be true.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 22 Mar 2010 12:51:59 -0700 |
parents | 1d1d5d9bd884 |
children | afbf4ad814c7 |
comparison
equal
deleted
inserted
replaced
107459:51f4b3cf3db9 | 107460:c3852852bbc0 |
---|---|
1876 struct sigaction sigint_action; | 1876 struct sigaction sigint_action; |
1877 struct sigaction sigquit_action; | 1877 struct sigaction sigquit_action; |
1878 #ifdef AIX | 1878 #ifdef AIX |
1879 struct sigaction sighup_action; | 1879 struct sigaction sighup_action; |
1880 #endif | 1880 #endif |
1881 #else /* !POSIX_SIGNALS */ | 1881 #endif /* POSIX_SIGNALS */ |
1882 #if 0 | |
1883 #ifdef SIGCHLD | |
1884 SIGTYPE (*sigchld)(); | |
1885 #endif | |
1886 #endif /* 0 */ | |
1887 #endif /* !POSIX_SIGNALS */ | |
1888 /* Use volatile to protect variables from being clobbered by longjmp. */ | 1882 /* Use volatile to protect variables from being clobbered by longjmp. */ |
1889 volatile int forkin, forkout; | 1883 volatile int forkin, forkout; |
1890 volatile int pty_flag = 0; | 1884 volatile int pty_flag = 0; |
1891 #ifndef USE_CRT_DLL | 1885 #ifndef USE_CRT_DLL |
1892 extern char **environ; | 1886 extern char **environ; |
2006 #endif | 2000 #endif |
2007 #endif /* HAVE_WORKING_VFORK */ | 2001 #endif /* HAVE_WORKING_VFORK */ |
2008 sigprocmask (SIG_BLOCK, &blocked, &procmask); | 2002 sigprocmask (SIG_BLOCK, &blocked, &procmask); |
2009 #else /* !POSIX_SIGNALS */ | 2003 #else /* !POSIX_SIGNALS */ |
2010 #ifdef SIGCHLD | 2004 #ifdef SIGCHLD |
2011 #if defined (BSD_SYSTEM) || defined (HPUX) | 2005 #if defined (BSD_SYSTEM) |
2012 sigsetmask (sigmask (SIGCHLD)); | 2006 sigsetmask (sigmask (SIGCHLD)); |
2013 #else /* ordinary USG */ | 2007 #endif /* BSD_SYSTEM */ |
2014 #if 0 | |
2015 sigchld_deferred = 0; | |
2016 sigchld = signal (SIGCHLD, create_process_sigchld); | |
2017 #endif | |
2018 #endif /* ordinary USG */ | |
2019 #endif /* SIGCHLD */ | 2008 #endif /* SIGCHLD */ |
2020 #endif /* !POSIX_SIGNALS */ | 2009 #endif /* !POSIX_SIGNALS */ |
2021 | 2010 |
2022 FD_SET (inchannel, &input_wait_mask); | 2011 FD_SET (inchannel, &input_wait_mask); |
2023 FD_SET (inchannel, &non_keyboard_wait_mask); | 2012 FD_SET (inchannel, &non_keyboard_wait_mask); |
2170 /* Stop blocking signals in the child. */ | 2159 /* Stop blocking signals in the child. */ |
2171 #ifdef POSIX_SIGNALS | 2160 #ifdef POSIX_SIGNALS |
2172 sigprocmask (SIG_SETMASK, &procmask, 0); | 2161 sigprocmask (SIG_SETMASK, &procmask, 0); |
2173 #else /* !POSIX_SIGNALS */ | 2162 #else /* !POSIX_SIGNALS */ |
2174 #ifdef SIGCHLD | 2163 #ifdef SIGCHLD |
2175 #if defined (BSD_SYSTEM) || defined (HPUX) | 2164 #if defined (BSD_SYSTEM) |
2176 sigsetmask (SIGEMPTYMASK); | 2165 sigsetmask (SIGEMPTYMASK); |
2177 #else /* ordinary USG */ | 2166 #endif /* BSD_SYSTEM */ |
2178 #if 0 | |
2179 signal (SIGCHLD, sigchld); | |
2180 #endif | |
2181 #endif /* ordinary USG */ | |
2182 #endif /* SIGCHLD */ | 2167 #endif /* SIGCHLD */ |
2183 #endif /* !POSIX_SIGNALS */ | 2168 #endif /* !POSIX_SIGNALS */ |
2184 | 2169 |
2185 if (pty_flag) | 2170 if (pty_flag) |
2186 child_setup_tty (xforkout); | 2171 child_setup_tty (xforkout); |
2273 #endif /* HAVE_WORKING_VFORK */ | 2258 #endif /* HAVE_WORKING_VFORK */ |
2274 /* Stop blocking signals in the parent. */ | 2259 /* Stop blocking signals in the parent. */ |
2275 sigprocmask (SIG_SETMASK, &procmask, 0); | 2260 sigprocmask (SIG_SETMASK, &procmask, 0); |
2276 #else /* !POSIX_SIGNALS */ | 2261 #else /* !POSIX_SIGNALS */ |
2277 #ifdef SIGCHLD | 2262 #ifdef SIGCHLD |
2278 #if defined (BSD_SYSTEM) || defined (HPUX) | 2263 #if defined (BSD_SYSTEM) |
2279 sigsetmask (SIGEMPTYMASK); | 2264 sigsetmask (SIGEMPTYMASK); |
2280 #else /* ordinary USG */ | 2265 #endif /* BSD_SYSTEM */ |
2281 #if 0 | |
2282 signal (SIGCHLD, sigchld); | |
2283 /* Now really handle any of these signals | |
2284 that came in during this function. */ | |
2285 if (sigchld_deferred) | |
2286 kill (getpid (), SIGCHLD); | |
2287 #endif | |
2288 #endif /* ordinary USG */ | |
2289 #endif /* SIGCHLD */ | 2266 #endif /* SIGCHLD */ |
2290 #endif /* !POSIX_SIGNALS */ | 2267 #endif /* !POSIX_SIGNALS */ |
2291 | 2268 |
2292 /* Now generate the error if vfork failed. */ | 2269 /* Now generate the error if vfork failed. */ |
2293 if (pid < 0) | 2270 if (pid < 0) |
6702 if (pid <= 0) | 6679 if (pid <= 0) |
6703 { | 6680 { |
6704 /* PID == 0 means no processes found, PID == -1 means a real | 6681 /* PID == 0 means no processes found, PID == -1 means a real |
6705 failure. We have done all our job, so return. */ | 6682 failure. We have done all our job, so return. */ |
6706 | 6683 |
6707 /* USG systems forget handlers when they are used; | |
6708 must reestablish each time */ | |
6709 #if defined (USG) && !defined (POSIX_SIGNALS) | |
6710 signal (signo, sigchld_handler); /* WARNING - must come after wait3() */ | |
6711 #endif | |
6712 errno = old_errno; | 6684 errno = old_errno; |
6713 return; | 6685 return; |
6714 } | 6686 } |
6715 #else | 6687 #else |
6716 pid = wait (&w); | 6688 pid = wait (&w); |
6807 Otherwise (on systems that have WNOHANG), loop around | 6779 Otherwise (on systems that have WNOHANG), loop around |
6808 to use up all the processes that have something to tell us. */ | 6780 to use up all the processes that have something to tell us. */ |
6809 #if (defined WINDOWSNT \ | 6781 #if (defined WINDOWSNT \ |
6810 || (defined USG && !defined GNU_LINUX \ | 6782 || (defined USG && !defined GNU_LINUX \ |
6811 && !(defined HPUX && defined WNOHANG))) | 6783 && !(defined HPUX && defined WNOHANG))) |
6812 #if defined (USG) && ! defined (POSIX_SIGNALS) | |
6813 signal (signo, sigchld_handler); | |
6814 #endif | |
6815 errno = old_errno; | 6784 errno = old_errno; |
6816 return; | 6785 return; |
6817 #endif /* USG, but not HPUX with WNOHANG */ | 6786 #endif /* USG, but not HPUX with WNOHANG */ |
6818 } | 6787 } |
6819 } | 6788 } |