unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: James Cloos <cloos@jhcloos.com>
To: emacs-devel@gnu.org
Cc: Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
Subject: Re: signal-process vs. kill(1)
Date: Sun, 30 Mar 2008 13:00:25 -0400	[thread overview]
Message-ID: <m31w5s87un.fsf@lugabout.jhcloos.org> (raw)
In-Reply-To: <18414.54679.370438.224958@tfkp07.physik.uni-erlangen.de> (Roland Winkler's message of "Sun, 30 Mar 2008 00:49:43 +0100")

>>>>> "Roland" == Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> writes:

Roland> Right now proced.el uses kill(1) to send signals to a process. By
Roland> change I discovered the emacs built-in function signal-process ...

Roland> It seems to me that using signal-process is the cleaner
Roland> way to go. Is that right? Or would it make sense to make this
Roland> configurable?

I was about to write that the only difference on posix systems would be
that using (signal-process) will make just one system call (ie kill(2)),
whereas using kill(1) requires calling execve(2), vm allocation,
filesystem reads just so that kill(1) can call kill(2).

But it might be the case in a locked-down system that kill(1) -- or some
similar program -- might have more privs than emacs and therefore may be
able to signal more processes that emacs could directly signal.

Also, I've no idea how process signalling works on doze.

There is no question that (signal-process) should be the default.  But
there might be some corner-case systems where using a separate process
to send signals could be necessary.

On a separate note, users might want to be able to call "sudo kill $foo"
to signal processes they do not own.  If you have or add support for that,
do make "sudo" customizable since there are alternatives in the wild.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6




      reply	other threads:[~2008-03-30 17:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-29 23:49 signal-process vs. kill(1) Roland Winkler
2008-03-30 17:00 ` James Cloos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31w5s87un.fsf@lugabout.jhcloos.org \
    --to=cloos@jhcloos.com \
    --cc=Roland.Winkler@physik.uni-erlangen.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).