* sysdep.c (child_setup_tty): Remove duplicate settings for VQUIT
[bpt/emacs.git] / src / process.c
index f2c0125..fd15ea9 100644 (file)
@@ -235,7 +235,11 @@ int update_tick;
 /* We could get this from param.h, but better not to depend on finding that.
    And better not to risk that it might define other symbols used in this
    file.  */
+#ifdef FD_SETSIZE
+#define MAXDESC FD_SETSIZE
+#else
 #define MAXDESC 64
+#endif
 #define SELECT_TYPE fd_set
 #else /* no FD_SET */
 #define MAXDESC 32
@@ -287,7 +291,7 @@ update_status (p)
   p->raw_status_high = Qnil;
 }
 
-/*  Convert a process status work in Unix format to 
+/*  Convert a process status word in Unix format to 
     the list that we use internally.  */
 
 Lisp_Object
@@ -1074,7 +1078,7 @@ start_process_unwind (proc)
     abort ();
 
   /* Was PROC started successfully?  */
-  if (XPROCESS (proc)->pid <= 0)
+  if (XINT (XPROCESS (proc)->pid) <= 0)
     remove_process (proc);
 
   return Qnil;
@@ -1474,7 +1478,7 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
     report_file_error ("error creating socket", Fcons (name, Qnil));
 
  loop:
-  if (connect (s, &address, sizeof address) == -1)
+  if (connect (s, (struct sockaddr *) &address, sizeof address) == -1)
     {
       int xerrno = errno;
       if (errno == EINTR)
@@ -1679,7 +1683,7 @@ static int waiting_for_user_input_p;
    If read_kbd is a pointer to a struct Lisp_Process, then the
      function returns true iff we received input from that process
      before the timeout elapsed.
-   Otherwise, return true iff we recieved input from any process.  */
+   Otherwise, return true iff we received input from any process.  */
 
 wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
      int time_limit, microsecs;
@@ -2071,9 +2075,16 @@ read_process_output (proc, channel)
         hitting ^G when a filter happens to be running won't screw
         it up.  */
       int count = specpdl_ptr - specpdl;
+      Lisp_Object odeactivate;
+
+      odeactivate = Vdeactivate_mark;
+
       specbind (Qinhibit_quit, Qt);
       call2 (outstream, proc, make_string (chars, nchars));
 
+      /* Handling the process output should not deactivate the mark.  */
+      Vdeactivate_mark = odeactivate;
+
 #ifdef VMS
       start_vms_process_read (vs);
 #endif
@@ -2086,6 +2097,9 @@ read_process_output (proc, channel)
     {
       Lisp_Object old_read_only;
       Lisp_Object old_begv, old_zv;
+      Lisp_Object odeactivate;
+
+      odeactivate = Vdeactivate_mark;
 
       Fset_buffer (p->buffer);
       opoint = point;
@@ -2130,6 +2144,9 @@ read_process_output (proc, channel)
       if (XFASTINT (old_begv) != BEGV || XFASTINT (old_zv) != ZV)
        Fnarrow_to_region (old_begv, old_zv);
 
+      /* Handling the process output should not deactivate the mark.  */
+      Vdeactivate_mark = odeactivate;
+
       current_buffer->read_only = old_read_only;
       SET_PT (opoint);
       set_buffer_internal (old);
@@ -2783,7 +2800,7 @@ sigchld_handler (signo)
            synch_process_retcode = WRETCODE (w);
          else if (WIFSIGNALED (w))
 #ifndef VMS
-           synch_process_death = sys_siglist[WTERMSIG (w)];
+           synch_process_death = (char *) sys_siglist[WTERMSIG (w)];
 #else
            synch_process_death = sys_errlist[WTERMSIG (w)];
 #endif
@@ -3085,7 +3102,7 @@ extern int frame_garbaged;
    do_display != 0 means redisplay should be done to show subprocess
    output that arrives.  This version of the function ignores it.
 
-   Return true iff we recieved input from any process.  */
+   Return true iff we received input from any process.  */
 
 int
 wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)