emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: signal-process vs. kill(1)


From: James Cloos
Subject: Re: signal-process vs. kill(1)
Date: Sun, 30 Mar 2008 13:00:25 -0400
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

>>>>> "Roland" == Roland Winkler <address@hidden> 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 <address@hidden>         OpenPGP: 1024D/ED7DAEA6




reply via email to

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