emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99719: Remove dead code dealing with


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99719: Remove dead code dealing with POSIX_SIGNALS.
Date: Mon, 22 Mar 2010 12:51:59 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99719
committer: Dan Nicolaescu <address@hidden>
branch nick: trunk
timestamp: Mon 2010-03-22 12:51:59 -0700
message:
  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.
modified:
  src/ChangeLog
  src/atimer.c
  src/data.c
  src/keyboard.c
  src/process.c
  src/syssignal.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-03-22 02:56:56 +0000
+++ b/src/ChangeLog     2010-03-22 19:51:59 +0000
@@ -1,5 +1,17 @@
 2010-03-22  Dan Nicolaescu  <address@hidden>
 
+       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.
+
        * keyboard.c (Fset_input_interrupt_mode): Remove code depending on
        NO_SOCK_SIGIO, not used anymore.
 

=== modified file 'src/atimer.c'
--- a/src/atimer.c      2010-01-13 08:35:10 +0000
+++ b/src/atimer.c      2010-03-22 19:51:59 +0000
@@ -296,12 +296,6 @@
 static void
 set_alarm ()
 {
-#if defined (USG) && !defined (POSIX_SIGNALS)
-  /* USG systems forget handlers when they are used;
-     must reestablish each time.  */
-  signal (SIGALRM, alarm_signal_handler);
-#endif /* USG */
-
   if (atimers)
     {
       EMACS_TIME now, time;

=== modified file 'src/data.c'
--- a/src/data.c        2010-01-13 08:35:10 +0000
+++ b/src/data.c        2010-03-22 19:51:59 +0000
@@ -3291,11 +3291,6 @@
 arith_error (signo)
      int signo;
 {
-#if defined(USG) && !defined(POSIX_SIGNALS)
-  /* USG systems forget handlers when they are used;
-     must reestablish each time */
-  signal (signo, arith_error);
-#endif /* USG */
   sigsetmask (SIGEMPTYMASK);
 
   SIGNAL_THREAD_CHECK (signo);

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2010-03-22 02:56:56 +0000
+++ b/src/keyboard.c    2010-03-22 19:51:59 +0000
@@ -7507,12 +7507,6 @@
 {
   /* Must preserve main program's value of errno.  */
   int old_errno = errno;
-#if defined (USG) && !defined (POSIX_SIGNALS)
-  /* USG systems forget handlers when they are used;
-     must reestablish each time */
-  signal (signo, input_available_signal);
-#endif /* USG */
-
   SIGNAL_THREAD_CHECK (signo);
 
 #ifdef SYNC_INPUT
@@ -7595,12 +7589,6 @@
   int old_errno = errno;
   struct user_signal_info *p;
 
-#if defined (USG) && !defined (POSIX_SIGNALS)
-  /* USG systems forget handlers when they are used;
-     must reestablish each time */
-  signal (sig, handle_user_signal);
-#endif
-
   SIGNAL_THREAD_CHECK (sig);
 
   for (p = user_signals; p; p = p->next)
@@ -11089,13 +11077,6 @@
   int old_errno = errno;
   struct terminal *terminal;
 
-#if defined (USG) && !defined (POSIX_SIGNALS)
-  /* USG systems forget handlers when they are used;
-     must reestablish each time */
-  signal (SIGINT, interrupt_signal);
-  signal (SIGQUIT, interrupt_signal);
-#endif /* USG */
-
   SIGNAL_THREAD_CHECK (signalnum);
 
   /* See if we have an active terminal on our controlling tty. */

=== modified file 'src/process.c'
--- a/src/process.c     2010-01-13 08:35:10 +0000
+++ b/src/process.c     2010-03-22 19:51:59 +0000
@@ -1878,13 +1878,7 @@
 #ifdef AIX
   struct sigaction sighup_action;
 #endif
-#else /* !POSIX_SIGNALS */
-#if 0
-#ifdef SIGCHLD
-  SIGTYPE (*sigchld)();
-#endif
-#endif /* 0 */
-#endif /* !POSIX_SIGNALS */
+#endif /* POSIX_SIGNALS */
   /* Use volatile to protect variables from being clobbered by longjmp.  */
   volatile int forkin, forkout;
   volatile int pty_flag = 0;
@@ -2008,14 +2002,9 @@
   sigprocmask (SIG_BLOCK, &blocked, &procmask);
 #else /* !POSIX_SIGNALS */
 #ifdef SIGCHLD
-#if defined (BSD_SYSTEM) || defined (HPUX)
+#if defined (BSD_SYSTEM)
   sigsetmask (sigmask (SIGCHLD));
-#else /* ordinary USG */
-#if 0
-  sigchld_deferred = 0;
-  sigchld = signal (SIGCHLD, create_process_sigchld);
-#endif
-#endif /* ordinary USG */
+#endif /* BSD_SYSTEM */
 #endif /* SIGCHLD */
 #endif /* !POSIX_SIGNALS */
 
@@ -2172,13 +2161,9 @@
        sigprocmask (SIG_SETMASK, &procmask, 0);
 #else /* !POSIX_SIGNALS */
 #ifdef SIGCHLD
-#if defined (BSD_SYSTEM) || defined (HPUX)
+#if defined (BSD_SYSTEM)
        sigsetmask (SIGEMPTYMASK);
-#else /* ordinary USG */
-#if 0
-       signal (SIGCHLD, sigchld);
-#endif
-#endif /* ordinary USG */
+#endif /* BSD_SYSTEM */
 #endif /* SIGCHLD */
 #endif /* !POSIX_SIGNALS */
 
@@ -2275,17 +2260,9 @@
   sigprocmask (SIG_SETMASK, &procmask, 0);
 #else /* !POSIX_SIGNALS */
 #ifdef SIGCHLD
-#if defined (BSD_SYSTEM) || defined (HPUX)
+#if defined (BSD_SYSTEM)
   sigsetmask (SIGEMPTYMASK);
-#else /* ordinary USG */
-#if 0
-  signal (SIGCHLD, sigchld);
-  /* Now really handle any of these signals
-     that came in during this function.  */
-  if (sigchld_deferred)
-    kill (getpid (), SIGCHLD);
-#endif
-#endif /* ordinary USG */
+#endif /* BSD_SYSTEM */
 #endif /* SIGCHLD */
 #endif /* !POSIX_SIGNALS */
 
@@ -6704,11 +6681,6 @@
          /* PID == 0 means no processes found, PID == -1 means a real
             failure.  We have done all our job, so return.  */
 
-         /* USG systems forget handlers when they are used;
-            must reestablish each time */
-#if defined (USG) && !defined (POSIX_SIGNALS)
-         signal (signo, sigchld_handler);   /* WARNING - must come after 
wait3() */
-#endif
          errno = old_errno;
          return;
        }
@@ -6809,9 +6781,6 @@
 #if (defined WINDOWSNT \
      || (defined USG && !defined GNU_LINUX \
         && !(defined HPUX && defined WNOHANG)))
-#if defined (USG) && ! defined (POSIX_SIGNALS)
-      signal (signo, sigchld_handler);
-#endif
       errno = old_errno;
       return;
 #endif /* USG, but not HPUX with WNOHANG */

=== modified file 'src/syssignal.h'
--- a/src/syssignal.h   2010-01-13 08:35:10 +0000
+++ b/src/syssignal.h   2010-03-22 19:51:59 +0000
@@ -88,38 +88,12 @@
 #define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG)
 
 #else /* ! defined (POSIX_SIGNALS) */
-#ifdef USG5_4
-
-extern SIGMASKTYPE sigprocmask_set;
-
-#ifndef sigblock
-#define sigblock(sig)                                  \
-     (sigprocmask_set = SIGEMPTYMASK | (sig),          \
-      sigprocmask (SIG_BLOCK, &sigprocmask_set, NULL))
-#endif
-
-#ifndef sigunblock
-#define sigunblock(sig)                                                \
-     (sigprocmask_set = SIGFULLMASK & ~(sig),                  \
-      sigprocmask (SIG_SETMASK, &sigprocmask_set, NULL))
-#endif
-
-#else
-#ifdef USG
-
-#ifndef sigunblock
-#define sigunblock(sig)
-#endif
-
-#else
 
 #ifndef sigunblock
 #define sigunblock(SIG) \
 { SIGMASKTYPE omask = sigblock (SIGEMPTYMASK); sigsetmask (omask & ~SIG); }
 #endif
 
-#endif /* ! defined (USG) */
-#endif /* ! defined (USG5_4) */
 #endif /* ! defined (POSIX_SIGNALS) */
 
 #ifndef SIGMASKTYPE


reply via email to

[Prev in Thread] Current Thread [Next in Thread]