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, 28 Oct 2002 18:18:50 -0500

Index: emacs/src/process.c
diff -c emacs/src/process.c:1.382 emacs/src/process.c:1.383
*** emacs/src/process.c:1.382   Thu Oct 24 04:03:41 2002
--- emacs/src/process.c Mon Oct 28 18:18:50 2002
***************
*** 5391,5404 ****
  }
  
  DEFUN ("signal-process", Fsignal_process, Ssignal_process,
!        2, 2, "nProcess number: \nnSignal code: ",
!        doc: /* Send the process with process id PID the signal with code 
SIGCODE.
! PID must be an integer.  The process need not be a child of this Emacs.
  SIGCODE may be an integer, or a symbol whose name is a signal name.  */)
!      (pid, sigcode)
!      Lisp_Object pid, sigcode;
  {
!   CHECK_NUMBER (pid);
  
  #define handle_signal(NAME, VALUE)            \
    else if (!strcmp (name, NAME))              \
--- 5391,5436 ----
  }
  
  DEFUN ("signal-process", Fsignal_process, Ssignal_process,
!        2, 2, "sProcess (name or number): \nnSignal code: ",
!        doc: /* Send PROCESS the signal with code SIGCODE.
! PROCESS may also be an integer specifying the process id of the
! process to signal; in this case, the process need not be a child of
! this Emacs.
  SIGCODE may be an integer, or a symbol whose name is a signal name.  */)
!      (process, sigcode)
!      Lisp_Object process, sigcode;
  {
!   Lisp_Object pid;
! 
!   if (INTEGERP (process))
!     {
!       pid = process;
!       goto got_it;
!     }
! 
!   if (STRINGP (process))
!     {
!       Lisp_Object tem;
!       if (tem = Fget_process (process), NILP (tem))
!       {
!         pid = Fstring_to_number (process, make_number (10));
!         if (XINT (pid) != 0)
!           goto got_it;
!       }
!       process = tem;
!     }
!   else
!     process = get_process (process);
!       
!   if (NILP (process))
!     return process;
! 
!   CHECK_PROCESS (process);
!   pid = XPROCESS (process)->pid;
!   if (!INTEGERP (pid) || XINT (pid) <= 0)
!     error ("Cannot signal process %s", SDATA (XPROCESS (process)->name));
! 
!  got_it:
  
  #define handle_signal(NAME, VALUE)            \
    else if (!strcmp (name, NAME))              \




reply via email to

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