aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Nicolaescu2010-03-22 12:51:59 -0700
committerDan Nicolaescu2010-03-22 12:51:59 -0700
commitdf7734b220de9c61575677adbc1f431ef6703d84 (patch)
tree473e250a995414540138dd17c4b4741b2b020e91 /src
parent64cb11ccee98233ad1c44496f4dd6fed8e64a155 (diff)
downloademacs-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')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/atimer.c6
-rw-r--r--src/data.c5
-rw-r--r--src/keyboard.c19
-rw-r--r--src/process.c45
-rw-r--r--src/syssignal.h26
6 files changed, 19 insertions, 94 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ab47c2cab02..7242bd4c371 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,17 @@
12010-03-22 Dan Nicolaescu <dann@ics.uci.edu> 12010-03-22 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 Remove dead code dealing with POSIX_SIGNALS.
4 * atimer.c (set_alarm): Remove dead code, all USG systems define
5 POSIX_SIGNALS.
6 * data.c (arith_error): Likewise.
7 * keyboard.c (input_available_signal, handle_user_signal)
8 (interrupt_signal): Likewise.
9 * process.c (sigchld_handler): Likewise.
10 (create_process): Remove if 0 code. Remove HPUX conditional when
11 !defined (POSIX_SIGNALS), it cannot be true.
12 * syssignal.h: Remove USG5_4 and USG conditionals when
13 !POSIX_SIGNALS, they cannot be true.
14
3 * keyboard.c (Fset_input_interrupt_mode): Remove code depending on 15 * keyboard.c (Fset_input_interrupt_mode): Remove code depending on
4 NO_SOCK_SIGIO, not used anymore. 16 NO_SOCK_SIGIO, not used anymore.
5 17
diff --git a/src/atimer.c b/src/atimer.c
index 432e2590dad..556272d7918 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -296,12 +296,6 @@ unwind_stop_other_atimers (dummy)
296static void 296static void
297set_alarm () 297set_alarm ()
298{ 298{
299#if defined (USG) && !defined (POSIX_SIGNALS)
300 /* USG systems forget handlers when they are used;
301 must reestablish each time. */
302 signal (SIGALRM, alarm_signal_handler);
303#endif /* USG */
304
305 if (atimers) 299 if (atimers)
306 { 300 {
307 EMACS_TIME now, time; 301 EMACS_TIME now, time;
diff --git a/src/data.c b/src/data.c
index e405ca6af9e..bdba3a9bb36 100644
--- a/src/data.c
+++ b/src/data.c
@@ -3291,11 +3291,6 @@ SIGTYPE
3291arith_error (signo) 3291arith_error (signo)
3292 int signo; 3292 int signo;
3293{ 3293{
3294#if defined(USG) && !defined(POSIX_SIGNALS)
3295 /* USG systems forget handlers when they are used;
3296 must reestablish each time */
3297 signal (signo, arith_error);
3298#endif /* USG */
3299 sigsetmask (SIGEMPTYMASK); 3294 sigsetmask (SIGEMPTYMASK);
3300 3295
3301 SIGNAL_THREAD_CHECK (signo); 3296 SIGNAL_THREAD_CHECK (signo);
diff --git a/src/keyboard.c b/src/keyboard.c
index 6582af7f805..f6d6704b373 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7507,12 +7507,6 @@ input_available_signal (signo)
7507{ 7507{
7508 /* Must preserve main program's value of errno. */ 7508 /* Must preserve main program's value of errno. */
7509 int old_errno = errno; 7509 int old_errno = errno;
7510#if defined (USG) && !defined (POSIX_SIGNALS)
7511 /* USG systems forget handlers when they are used;
7512 must reestablish each time */
7513 signal (signo, input_available_signal);
7514#endif /* USG */
7515
7516 SIGNAL_THREAD_CHECK (signo); 7510 SIGNAL_THREAD_CHECK (signo);
7517 7511
7518#ifdef SYNC_INPUT 7512#ifdef SYNC_INPUT
@@ -7595,12 +7589,6 @@ handle_user_signal (sig)
7595 int old_errno = errno; 7589 int old_errno = errno;
7596 struct user_signal_info *p; 7590 struct user_signal_info *p;
7597 7591
7598#if defined (USG) && !defined (POSIX_SIGNALS)
7599 /* USG systems forget handlers when they are used;
7600 must reestablish each time */
7601 signal (sig, handle_user_signal);
7602#endif
7603
7604 SIGNAL_THREAD_CHECK (sig); 7592 SIGNAL_THREAD_CHECK (sig);
7605 7593
7606 for (p = user_signals; p; p = p->next) 7594 for (p = user_signals; p; p = p->next)
@@ -11089,13 +11077,6 @@ interrupt_signal (signalnum) /* If we don't have an argument, */
11089 int old_errno = errno; 11077 int old_errno = errno;
11090 struct terminal *terminal; 11078 struct terminal *terminal;
11091 11079
11092#if defined (USG) && !defined (POSIX_SIGNALS)
11093 /* USG systems forget handlers when they are used;
11094 must reestablish each time */
11095 signal (SIGINT, interrupt_signal);
11096 signal (SIGQUIT, interrupt_signal);
11097#endif /* USG */
11098
11099 SIGNAL_THREAD_CHECK (signalnum); 11080 SIGNAL_THREAD_CHECK (signalnum);
11100 11081
11101 /* See if we have an active terminal on our controlling tty. */ 11082 /* See if we have an active terminal on our controlling tty. */
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 */
diff --git a/src/syssignal.h b/src/syssignal.h
index 64dacc671ce..f435d338594 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -88,38 +88,12 @@ sigset_t sys_sigsetmask P_ ((sigset_t new_mask));
88#define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG) 88#define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG)
89 89
90#else /* ! defined (POSIX_SIGNALS) */ 90#else /* ! defined (POSIX_SIGNALS) */
91#ifdef USG5_4
92
93extern SIGMASKTYPE sigprocmask_set;
94
95#ifndef sigblock
96#define sigblock(sig) \
97 (sigprocmask_set = SIGEMPTYMASK | (sig), \
98 sigprocmask (SIG_BLOCK, &sigprocmask_set, NULL))
99#endif
100
101#ifndef sigunblock
102#define sigunblock(sig) \
103 (sigprocmask_set = SIGFULLMASK & ~(sig), \
104 sigprocmask (SIG_SETMASK, &sigprocmask_set, NULL))
105#endif
106
107#else
108#ifdef USG
109
110#ifndef sigunblock
111#define sigunblock(sig)
112#endif
113
114#else
115 91
116#ifndef sigunblock 92#ifndef sigunblock
117#define sigunblock(SIG) \ 93#define sigunblock(SIG) \
118{ SIGMASKTYPE omask = sigblock (SIGEMPTYMASK); sigsetmask (omask & ~SIG); } 94{ SIGMASKTYPE omask = sigblock (SIGEMPTYMASK); sigsetmask (omask & ~SIG); }
119#endif 95#endif
120 96
121#endif /* ! defined (USG) */
122#endif /* ! defined (USG5_4) */
123#endif /* ! defined (POSIX_SIGNALS) */ 97#endif /* ! defined (POSIX_SIGNALS) */
124 98
125#ifndef SIGMASKTYPE 99#ifndef SIGMASKTYPE