Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
cdd5ea86
Commit
cdd5ea86
authored
Oct 28, 2002
by
Kim F. Storm
Browse files
(Fsignal_process): Allow PROCESS to be specified by
name in addition to pid (as integer or string).
parent
e8a32599
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
6 deletions
+38
-6
src/process.c
src/process.c
+38
-6
No files found.
src/process.c
View file @
cdd5ea86
...
...
@@ -5391,14 +5391,46 @@ If PROCESS is a network process, resume handling of incoming traffic. */)
}
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.
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. */)
(p
id
, sigcode)
Lisp_Object p
id
, sigcode;
(p
rocess
, sigcode)
Lisp_Object p
rocess
, sigcode;
{
CHECK_NUMBER (pid);
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)) \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment