diff options
| author | Dan Nicolaescu | 2010-03-22 12:51:59 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-03-22 12:51:59 -0700 |
| commit | df7734b220de9c61575677adbc1f431ef6703d84 (patch) | |
| tree | 473e250a995414540138dd17c4b4741b2b020e91 /src/process.c | |
| parent | 64cb11ccee98233ad1c44496f4dd6fed8e64a155 (diff) | |
| download | emacs-df7734b220de9c61575677adbc1f431ef6703d84.tar.gz emacs-df7734b220de9c61575677adbc1f431ef6703d84.zip | |
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.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/src/process.c b/src/process.c index 53cc42f223e..5d2d64e3ddc 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1878,13 +1878,7 @@ create_process (process, new_argv, current_dir) | |||
| 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; |
| @@ -2008,14 +2002,9 @@ create_process (process, new_argv, current_dir) | |||
| 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 | ||
| @@ -2172,13 +2161,9 @@ create_process (process, new_argv, current_dir) | |||
| 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 | ||
| @@ -2275,17 +2260,9 @@ create_process (process, new_argv, current_dir) | |||
| 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 | ||
| @@ -6704,11 +6681,6 @@ sigchld_handler (signo) | |||
| 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 | } |
| @@ -6809,9 +6781,6 @@ sigchld_handler (signo) | |||
| 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 */ |