changeset 1522:19ccf004b172

* process.c: (status_convert): Declare this to return a Lisp_Object at the top of the file. (decode_status): Don't untag XCONS (tem)->cdr before storing it in tem; tem is a Lisp_Object, too. (process_send_signal): Declare this to be static void. Don't return Qnil; nobody cares. (sigchld_handler): Use XFASTINT to manipulate p->infd. * process.c (pty_process): Variable deleted; it's no longer used. (syms_of_process): Don't initialize it.
author Jim Blandy <jimb@redhat.com>
date Sat, 31 Oct 1992 05:27:42 +0000
parents 5d58b9e933ee
children bd61aaa7828b
files src/process.c
diffstat 1 files changed, 12 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/process.c	Sat Oct 31 05:27:05 1992 +0000
+++ b/src/process.c	Sat Oct 31 05:27:42 1992 +0000
@@ -284,6 +284,8 @@
 /* Compute the Lisp form of the process status, p->status, from
    the numeric status that was returned by `wait'.  */
 
+Lisp_Object status_convert ();
+
 update_status (p)
      struct Lisp_Process *p;
 {
@@ -336,7 +338,7 @@
       *symbol = XCONS (l)->car;
       tem = XCONS (l)->cdr;
       *code = XFASTINT (XCONS (tem)->car);
-      tem = XFASTINT (XCONS (tem)->cdr);
+      tem = XCONS (tem)->cdr;
       *coredump = !NILP (tem);
     }
 }
@@ -374,7 +376,6 @@
 }
 
 #ifdef HAVE_PTYS
-static int pty_process;
 
 /* Open an available pty, returning a file descriptor.
    Return -1 on failure.
@@ -2218,6 +2219,7 @@
    If NOMSG is zero, insert signal-announcements into process's buffers
    right away.  */
 
+static void
 process_send_signal (process, signo, current_group, nomsg)
      Lisp_Object process;
      int signo;
@@ -2256,16 +2258,16 @@
 	case SIGINT:
 	  ioctl (XFASTINT (p->infd), TIOCGETC, &c);
 	  send_process (proc, &c.t_intrc, 1);
-	  return Qnil;
+	  return;
 	case SIGQUIT:
 	  ioctl (XFASTINT (p->infd), TIOCGETC, &c);
 	  send_process (proc, &c.t_quitc, 1);
-	  return Qnil;
+	  return;
 #ifdef SIGTSTP
 	case SIGTSTP:
 	  ioctl (XFASTINT (p->infd), TIOCGLTC, &lc);
 	  send_process (proc, &lc.t_suspc, 1);
-	  return Qnil;
+	  return;
 #endif /* SIGTSTP */
 	}
 #endif /* ! defined (TIOCGLTC) && defined (TIOCGETC) */
@@ -2279,15 +2281,15 @@
 	case SIGINT:
 	  ioctl (XFASTINT (p->infd), TCGETA, &t);
 	  send_process (proc, &t.c_cc[VINTR], 1);
-	  return Qnil;
+	  return;
 	case SIGQUIT:
 	  ioctl (XFASTINT (p->infd), TCGETA, &t);
 	  send_process (proc, &t.c_cc[VQUIT], 1);
-	  return Qnil;
+	  return;
 	case SIGTSTP:
 	  ioctl (XFASTINT (p->infd), TCGETA, &t);
 	  send_process (proc, &t.c_cc[VSWTCH], 1);
-	  return Qnil;
+	  return;
 	}
 #endif /* ! defined (USG) */
 
@@ -2620,8 +2622,8 @@
 	  
 	  /* If process has terminated, stop waiting for its output.  */
 	  if (WIFSIGNALED (w) || WIFEXITED (w))
-	    if (p->infd)
-	      FD_CLR (p->infd, &input_wait_mask);
+	    if (XFASTINT (p->infd))
+	      FD_CLR (XFASTINT (p->infd), &input_wait_mask);
 	}
 
 	/* There was no asynchronous process found for that id.  Check
@@ -2820,9 +2822,6 @@
 #endif
 syms_of_process ()
 {
-#ifdef HAVE_PTYS
-  pty_process = intern ("pty");
-#endif
 #ifdef HAVE_SOCKETS
   stream_process = intern ("stream");
 #endif