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: Mon, 15 Aug 2005 04:44:53 -0400

Index: emacs/src/process.c
diff -c emacs/src/process.c:1.462 emacs/src/process.c:1.463
*** emacs/src/process.c:1.462   Sun Aug  7 12:33:17 2005
--- emacs/src/process.c Mon Aug 15 08:44:53 2005
***************
*** 294,300 ****
  
  #include "sysselect.h"
  
! extern int keyboard_bit_set P_ ((SELECT_TYPE *));
  
  /* If we support a window system, turn on the code to poll periodically
     to detect C-g.  It isn't actually used when doing interrupt input.  */
--- 294,303 ----
  
  #include "sysselect.h"
  
! static int keyboard_bit_set P_ ((SELECT_TYPE *));
! static void deactivate_process P_ ((Lisp_Object));
! static void status_notify P_ ((struct Lisp_Process *));
! static int read_process_output P_ ((Lisp_Object, int));
  
  /* If we support a window system, turn on the code to poll periodically
     to detect C-g.  It isn't actually used when doing interrupt input.  */
***************
*** 391,399 ****
  /* Compute the Lisp form of the process status, p->status, from
     the numeric status that was returned by `wait'.  */
  
! Lisp_Object status_convert ();
  
! void
  update_status (p)
       struct Lisp_Process *p;
  {
--- 394,402 ----
  /* Compute the Lisp form of the process status, p->status, from
     the numeric status that was returned by `wait'.  */
  
! static Lisp_Object status_convert ();
  
! static void
  update_status (p)
       struct Lisp_Process *p;
  {
***************
*** 407,413 ****
  /*  Convert a process status word in Unix format to
      the list that we use internally.  */
  
! Lisp_Object
  status_convert (w)
       WAITTYPE w;
  {
--- 410,416 ----
  /*  Convert a process status word in Unix format to
      the list that we use internally.  */
  
! static Lisp_Object
  status_convert (w)
       WAITTYPE w;
  {
***************
*** 426,432 ****
  /* Given a status-list, extract the three pieces of information
     and store them individually through the three pointers.  */
  
! void
  decode_status (l, symbol, code, coredump)
       Lisp_Object l;
       Lisp_Object *symbol;
--- 429,435 ----
  /* Given a status-list, extract the three pieces of information
     and store them individually through the three pointers.  */
  
! static void
  decode_status (l, symbol, code, coredump)
       Lisp_Object l;
       Lisp_Object *symbol;
***************
*** 505,511 ****
     The file name of the terminal corresponding to the pty
     is left in the variable pty_name.  */
  
! int
  allocate_pty ()
  {
    register int c, i;
--- 508,514 ----
     The file name of the terminal corresponding to the pty
     is left in the variable pty_name.  */
  
! static int
  allocate_pty ()
  {
    register int c, i;
***************
*** 590,596 ****
  }
  #endif /* HAVE_PTYS */
  
! Lisp_Object
  make_process (name)
       Lisp_Object name;
  {
--- 593,599 ----
  }
  #endif /* HAVE_PTYS */
  
! static Lisp_Object
  make_process (name)
       Lisp_Object name;
  {
***************
*** 634,640 ****
    return val;
  }
  
! void
  remove_process (proc)
       register Lisp_Object proc;
  {
--- 637,643 ----
    return val;
  }
  
! static void
  remove_process (proc)
       register Lisp_Object proc;
  {
***************
*** 768,790 ****
       (process)
       register Lisp_Object process;
  {
    process = get_process (process);
!   XPROCESS (process)->raw_status_low = Qnil;
!   XPROCESS (process)->raw_status_high = Qnil;
!   if (NETCONN_P (process))
!     {
!       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)
      {
        Fkill_process (process, Qnil);
        /* Do this now, since remove_process will make sigchld_handler do 
nothing.  */
!       XPROCESS (process)->status
        = Fcons (Qsignal, Fcons (make_number (SIGKILL), Qnil));
!       XSETINT (XPROCESS (process)->tick, ++process_tick);
!       status_notify ();
      }
    remove_process (process);
    return Qnil;
--- 771,797 ----
       (process)
       register Lisp_Object process;
  {
+   register struct Lisp_Process *p;
+ 
    process = get_process (process);
!   p = XPROCESS (process);
! 
!   p->raw_status_low = Qnil;
!   p->raw_status_high = Qnil;
!   if (NETCONN1_P (p))
!     {
!       p->status = Fcons (Qexit, Fcons (make_number (0), Qnil));
!       XSETINT (p->tick, ++process_tick);
!       status_notify (p);
      }
!   else if (XINT (p->infd) >= 0)
      {
        Fkill_process (process, Qnil);
        /* Do this now, since remove_process will make sigchld_handler do 
nothing.  */
!       p->status
        = Fcons (Qsignal, Fcons (make_number (SIGKILL), Qnil));
!       XSETINT (p->tick, ++process_tick);
!       status_notify (p);
      }
    remove_process (process);
    return Qnil;
***************
*** 1238,1244 ****
  }
  #endif
  
! Lisp_Object
  list_processes_1 (query_only)
       Lisp_Object query_only;
  {
--- 1245,1251 ----
  }
  #endif
  
! static Lisp_Object
  list_processes_1 (query_only)
       Lisp_Object query_only;
  {
***************
*** 1708,1714 ****
    return Qnil;
  }
  
! void
  create_process_1 (timer)
       struct atimer *timer;
  {
--- 1715,1721 ----
    return Qnil;
  }
  
! static void
  create_process_1 (timer)
       struct atimer *timer;
  {
***************
*** 2531,2537 ****
  
  /* A version of request_sigio suitable for a record_unwind_protect.  */
  
! Lisp_Object
  unwind_request_sigio (dummy)
       Lisp_Object dummy;
  {
--- 2538,2544 ----
  
  /* A version of request_sigio suitable for a record_unwind_protect.  */
  
! static Lisp_Object
  unwind_request_sigio (dummy)
       Lisp_Object dummy;
  {
***************
*** 4222,4228 ****
              /* It's okay for us to do this and then continue with
                 the loop, since timeout has already been zeroed out.  */
              clear_waiting_for_input ();
!             status_notify ();
            }
        }
  
--- 4229,4235 ----
              /* It's okay for us to do this and then continue with
                 the loop, since timeout has already been zeroed out.  */
              clear_waiting_for_input ();
!             status_notify (NULL);
            }
        }
  
***************
*** 4740,4746 ****
     The characters read are decoded according to PROC's coding-system
     for decoding.  */
  
! int
  read_process_output (proc, channel)
       Lisp_Object proc;
       register int channel;
--- 4747,4753 ----
     The characters read are decoded according to PROC's coding-system
     for decoding.  */
  
! static int
  read_process_output (proc, channel)
       Lisp_Object proc;
       register int channel;
***************
*** 5131,5137 ****
  
     This function can evaluate Lisp code and can garbage collect.  */
  
! void
  send_process (proc, buf, len, object)
       volatile Lisp_Object proc;
       unsigned char *volatile buf;
--- 5138,5144 ----
  
     This function can evaluate Lisp code and can garbage collect.  */
  
! static void
  send_process (proc, buf, len, object)
       volatile Lisp_Object proc;
       unsigned char *volatile buf;
***************
*** 5725,5731 ****
        p->status = Qrun;
        XSETINT (p->tick, ++process_tick);
        if (!nomsg)
!       status_notify ();
        break;
  #endif /* ! defined (SIGCONT) */
      case SIGINT:
--- 5732,5738 ----
        p->status = Qrun;
        XSETINT (p->tick, ++process_tick);
        if (!nomsg)
!       status_notify (NULL);
        break;
  #endif /* ! defined (SIGCONT) */
      case SIGINT:
***************
*** 6393,6400 ****
     This is usually done while Emacs is waiting for keyboard input
     but can be done at other times.  */
  
! void
! status_notify ()
  {
    register Lisp_Object proc, buffer;
    Lisp_Object tail, msg;
--- 6400,6408 ----
     This is usually done while Emacs is waiting for keyboard input
     but can be done at other times.  */
  
! static void
! status_notify (deleting_process)
!      struct Lisp_Process *deleting_process;
  {
    register Lisp_Object proc, buffer;
    Lisp_Object tail, msg;
***************
*** 6430,6435 ****
--- 6438,6444 ----
                 && ! EQ (p->status, Qlisten)
                 && ! EQ (p->command, Qt)  /* Network process not stopped.  */
                 && XINT (p->infd) >= 0
+                && p != deleting_process
                 && read_process_output (proc, XINT (p->infd)) > 0);
  
          buffer = p->buffer;
***************
*** 6633,6639 ****
  /* Return nonzero if *MASK has a bit set
     that corresponds to one of the keyboard input descriptors.  */
  
! int
  keyboard_bit_set (mask)
       SELECT_TYPE *mask;
  {
--- 6642,6648 ----
  /* Return nonzero if *MASK has a bit set
     that corresponds to one of the keyboard input descriptors.  */
  
! static int
  keyboard_bit_set (mask)
       SELECT_TYPE *mask;
  {




reply via email to

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