emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/process.c


From: Kim F . Storm
Subject: [Emacs-diffs] Changes to emacs/src/process.c
Date: Sun, 06 Jun 2004 18:32:42 -0400

Index: emacs/src/process.c
diff -c emacs/src/process.c:1.430 emacs/src/process.c:1.431
*** emacs/src/process.c:1.430   Fri May 28 21:58:31 2004
--- emacs/src/process.c Sun Jun  6 22:17:53 2004
***************
*** 445,454 ****
  
  /* Return a string describing a process status list.  */
  
! Lisp_Object
! status_message (status)
!      Lisp_Object status;
  {
    Lisp_Object symbol;
    int code, coredump;
    Lisp_Object string, string2;
--- 445,455 ----
  
  /* Return a string describing a process status list.  */
  
! static Lisp_Object
! status_message (p)
!      struct Lisp_Process *p;
  {
+   Lisp_Object status = p->status;
    Lisp_Object symbol;
    int code, coredump;
    Lisp_Object string, string2;
***************
*** 469,474 ****
--- 470,477 ----
      }
    else if (EQ (symbol, Qexit))
      {
+       if (NETCONN1_P (p))
+       return build_string (code == 0 ? "deleted\n" : "connection broken by 
remote peer\n");
        if (code == 0)
        return build_string ("finished\n");
        string = Fnumber_to_string (make_number (code));
***************
*** 764,769 ****
--- 767,773 ----
      {
        XPROCESS (process)->status = Fcons (Qexit, Fcons (make_number (0), 
Qnil));
        XSETINT (XPROCESS (process)->tick, ++process_tick);
+       status_notify ();
      }
    else if (XINT (XPROCESS (process)->infd) >= 0)
      {
***************
*** 774,791 ****
        XSETINT (XPROCESS (process)->tick, ++process_tick);
        status_notify ();
      }
!   /* Do not call remove_process here; either status_notify has already done
!      it, or will do so the next time emacs polls for input.  Thus network
!      processes are not immediately removed, and their sentinel will be
!      called.
! 
!      Since Fdelete_process is called by kill_buffer_processes, this also
!      means that a network process sentinel will run after the buffer is
!      dead, which would not be the case if status_notify() were called
!      unconditionally here.  This way process sentinels observe consistent
!      behavior with regard to buffer-live-p.
!   */
!   /* remove_process (process); */
    return Qnil;
  }
  
--- 778,784 ----
        XSETINT (XPROCESS (process)->tick, ++process_tick);
        status_notify ();
      }
!   remove_process (process);
    return Qnil;
  }
  
***************
*** 4703,4709 ****
     starting with our buffered-ahead character if we have one.
     Yield number of decoded characters read.
  
!    This function reads at most 1024 characters.
     If you want to read all available subprocess output,
     you must call it repeatedly until it returns zero.
  
--- 4696,4702 ----
     starting with our buffered-ahead character if we have one.
     Yield number of decoded characters read.
  
!    This function reads at most 4096 characters.
     If you want to read all available subprocess output,
     you must call it repeatedly until it returns zero.
  
***************
*** 4723,4729 ****
    register int opoint;
    struct coding_system *coding = proc_decode_coding_system[channel];
    int carryover = XINT (p->decoding_carryover);
!   int readmax = 1024;
  
  #ifdef VMS
    VMS_PROC_STUFF *vs, *get_vms_process_pointer();
--- 4716,4722 ----
    register int opoint;
    struct coding_system *coding = proc_decode_coding_system[channel];
    int carryover = XINT (p->decoding_carryover);
!   int readmax = 4096;
  
  #ifdef VMS
    VMS_PROC_STUFF *vs, *get_vms_process_pointer();
***************
*** 4756,4771 ****
      }
  #else /* not VMS */
  
- #ifdef DATAGRAM_SOCKETS
-   /* A datagram is one packet; allow at least 1500+ bytes of data
-      corresponding to the typical Ethernet frame size.  */
-   if (DATAGRAM_CHAN_P (channel))
-     {
-       /* carryover = 0; */  /* Does carryover make sense for datagrams? */
-       readmax += 1024;
-     }
- #endif
- 
    chars = (char *) alloca (carryover + readmax);
    if (carryover)
      /* See the comment above.  */
--- 4749,4754 ----
***************
*** 6399,6405 ****
          /* Get the text to use for the message.  */
          if (!NILP (p->raw_status_low))
            update_status (p);
!         msg = status_message (p->status);
  
          /* If process is terminated, deactivate it or delete it.  */
          symbol = p->status;
--- 6382,6388 ----
          /* Get the text to use for the message.  */
          if (!NILP (p->raw_status_low))
            update_status (p);
!         msg = status_message (p);
  
          /* If process is terminated, deactivate it or delete it.  */
          symbol = p->status;




reply via email to

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