* list-processes and signal-process don't communicate @ 2002-09-21 16:23 Kai Großjohann 2002-10-25 14:18 ` Kim F. Storm 0 siblings, 1 reply; 5+ messages in thread From: Kai Großjohann @ 2002-09-21 16:23 UTC (permalink / raw) I'd expect that the output of M-x list-processes RET helps me for a subsequent M-x signal-process RET. Alas, this is not the case: list-processes doesn't print the process id and signal-process doesn't know about process names. A simple workaround would be to have list-processes show the pid. kai -- ~/.signature is: umop 3p!sdn (Frank Nobis) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: list-processes and signal-process don't communicate 2002-09-21 16:23 list-processes and signal-process don't communicate Kai Großjohann @ 2002-10-25 14:18 ` Kim F. Storm 2002-10-25 14:56 ` Kim F. Storm 2002-10-26 20:13 ` Richard Stallman 0 siblings, 2 replies; 5+ messages in thread From: Kim F. Storm @ 2002-10-25 14:18 UTC (permalink / raw) Cc: emacs-devel grossjoh@lothlorien.cs.uni-dortmund.de (Kai Großjohann) writes: > I'd expect that the output of M-x list-processes RET helps me for a > subsequent M-x signal-process RET. Alas, this is not the case: > list-processes doesn't print the process id and signal-process > doesn't know about process names. Allowing the user to enter the name of a process in addition to a numeric pid to signal-process would be trivial enhancement to signal-process: Index: process.c =================================================================== RCS file: /cvs/emacs/src/process.c,v retrieving revision 1.382 diff -c -r1.382 process.c *** process.c 24 Oct 2002 08:03:41 -0000 1.382 --- process.c 25 Oct 2002 13:15:28 -0000 *************** *** 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,5430 ---- } 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 (STRINGP (process)) ! { ! Lisp_Object tem; ! if (tem = Fget_process (process), !NILP (tem)) ! process = tem; ! else ! process = Fstring_to_number (process, make_number (10)); ! } ! else ! process = get_process (process); ! ! if (NILP (process)) ! return process; ! ! if (INTEGERP (process)) ! pid = process; ! else ! { ! CHECK_PROCESS (process); ! pid = XPROCESS (process)->pid; ! if (!INTEGERP (pid) || XINT (pid) <= 0) ! error ("Cannot signal process %s", SDATA (XPROCESS (process)->name)); ! } #define handle_signal(NAME, VALUE) \ else if (!strcmp (name, NAME)) \ > > A simple workaround would be to have list-processes show the pid. A more complex approach would be to make the list-processes buffer obey a mouse-3 click on a process to pop-up menu which allowed you to terminate them using the mouse. [and suitable keyboard short-cuts as well of course]. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: list-processes and signal-process don't communicate 2002-10-25 14:18 ` Kim F. Storm @ 2002-10-25 14:56 ` Kim F. Storm 2002-10-26 12:31 ` Kai Großjohann 2002-10-26 20:13 ` Richard Stallman 1 sibling, 1 reply; 5+ messages in thread From: Kim F. Storm @ 2002-10-25 14:56 UTC (permalink / raw) Cc: emacs-devel storm@cua.dk (Kim F. Storm) writes: > grossjoh@lothlorien.cs.uni-dortmund.de (Kai Großjohann) writes: > > > I'd expect that the output of M-x list-processes RET helps me for a > > subsequent M-x signal-process RET. Alas, this is not the case: > > list-processes doesn't print the process id and signal-process > > doesn't know about process names. > > Allowing the user to enter the name of a process in addition to > a numeric pid to signal-process would be trivial enhancement to > signal-process: > Please disregard the patch I just sent; it breaks existing use of signal-process! I'll make a proper patch if there is any interest in adding this. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: list-processes and signal-process don't communicate 2002-10-25 14:56 ` Kim F. Storm @ 2002-10-26 12:31 ` Kai Großjohann 0 siblings, 0 replies; 5+ messages in thread From: Kai Großjohann @ 2002-10-26 12:31 UTC (permalink / raw) storm@cua.dk (Kim F. Storm) writes: > Please disregard the patch I just sent; it breaks existing use of > signal-process! > > I'll make a proper patch if there is any interest in adding this. Well, I'd be interested, and Richard at least isn't opposed, so if it won't cause you too much trouble... kai -- ~/.signature is: umop ap!sdn (Frank Nobis) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: list-processes and signal-process don't communicate 2002-10-25 14:18 ` Kim F. Storm 2002-10-25 14:56 ` Kim F. Storm @ 2002-10-26 20:13 ` Richard Stallman 1 sibling, 0 replies; 5+ messages in thread From: Richard Stallman @ 2002-10-26 20:13 UTC (permalink / raw) Cc: grossjoh, emacs-devel It seems like a useful change--please install it. Would someone like to add a suitable command to the list-processes buffer? ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-10-26 20:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-09-21 16:23 list-processes and signal-process don't communicate Kai Großjohann 2002-10-25 14:18 ` Kim F. Storm 2002-10-25 14:56 ` Kim F. Storm 2002-10-26 12:31 ` Kai Großjohann 2002-10-26 20:13 ` Richard Stallman
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).