From: Miles Bader <miles@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Doing Linux admin work with Emacs
Date: Thu, 14 Oct 2010 19:17:13 +0900 [thread overview]
Message-ID: <buohbgpaxjq.fsf@dhlpc061.dev.necel.com> (raw)
In-Reply-To: barmar-C145FF.22342013102010@news.eternal-september.org
Barry Margolin <barmar@alum.mit.edu> writes:
>> There's one problem when launching a command with sudo in M-x shell: you
>> cannot kill it with emacs C-c C-c, since emacs runs as a normal user, it
>> cannot kill the sudo'ed process.
>
> You can kill it by typing C-q C-c RET. This sends a literal C-c to the
> shell's terminal, instead of Emacs sending a signal to the process.
Hmm, by if Emacs was configured correctly, "C-c C-c" should handle this
case properly though -- it uses (interrupt-subprocess nil t):
(interrupt-process &optional PROCESS CURRENT-GROUP)
Interrupt process PROCESS.
PROCESS may be a process, a buffer, or the name of a process or buffer.
No arg or nil means current buffer's process.
Second arg CURRENT-GROUP non-nil means send signal to
the current process-group of the process's controlling terminal
rather than to the process's own process group.
If the process is a shell, this means interrupt current subjob
rather than the shell.
... which basically interrupts the "terminal" (pty) rather than the
process itself.
Also, it Works For Me :)
-miles
--
Patience, n. A minor form of despair, disguised as a virtue.
next prev parent reply other threads:[~2010-10-14 10:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <70fd06bf-4566-4274-9381-ee569700cabd@n40g2000vbb.googlegroups.com>
2010-10-13 12:12 ` Doing Linux admin work with Emacs Richard Riley
2010-10-13 12:19 ` Pascal J. Bourguignon
2010-10-14 2:34 ` Barry Margolin
2010-10-14 8:17 ` Olivier Sirven
2010-10-14 10:17 ` Miles Bader [this message]
2010-10-14 12:46 ` bebop52
2010-10-14 15:00 ` Pascal J. Bourguignon
2010-10-14 21:42 ` Tim X
2010-10-15 1:50 ` Barry Margolin
2010-10-16 3:16 ` Miles Bader
2010-10-13 21:20 ` Tim X
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=buohbgpaxjq.fsf@dhlpc061.dev.necel.com \
--to=miles@gnu.org \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.