From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.bugs Subject: bug#1112: 23.0.60; Child process not cleaned up properly Date: Tue, 07 Oct 2008 21:24:45 +0200 Message-ID: <87abdgmcn6.fsf@gmx.de> References: Reply-To: Sven Joachim , 1112@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223409042 5371 80.91.229.12 (7 Oct 2008 19:50:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2008 19:50:42 +0000 (UTC) Cc: 1112@emacsbugs.donarmstrong.com To: Brent Goodrick Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 07 21:51:39 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KnIaR-0005B1-SG for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Oct 2008 21:51:16 +0200 Original-Received: from localhost ([127.0.0.1]:60543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnIZM-0002jh-SC for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Oct 2008 15:50:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KnIZJ-0002iJ-Sf for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2008 15:50:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KnIZH-0002gK-7q for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2008 15:50:05 -0400 Original-Received: from [199.232.76.173] (port=39648 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnIZH-0002gF-0F for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2008 15:50:03 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:59639) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KnIZG-00057H-B3 for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2008 15:50:02 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m97JnvSG031341; Tue, 7 Oct 2008 12:49:58 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m97JU3gs026779; Tue, 7 Oct 2008 12:30:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Sven Joachim Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 07 Oct 2008 19:30:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1112 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1112-submit@emacsbugs.donarmstrong.com id=B1112.122340749725451 (code B ref 1112); Tue, 07 Oct 2008 19:30:03 +0000 Original-Received: (at 1112) by emacsbugs.donarmstrong.com; 7 Oct 2008 19:24:57 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m97JOrW6025445 for <1112@emacsbugs.donarmstrong.com>; Tue, 7 Oct 2008 12:24:54 -0700 Original-Received: (qmail invoked by alias); 07 Oct 2008 19:24:47 -0000 Original-Received: from p5486663C.dip.t-dialin.net (EHLO debian) [84.134.102.60] by mail.gmx.net (mp022) with SMTP; 07 Oct 2008 21:24:47 +0200 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX19xKQUYqihxaYYLo06qTCf0K+G4VurBNqv2/1SLpO 0cbfwNobgV3gHx In-Reply-To: (Brent Goodrick's message of "Tue, 7 Oct 2008 08:15:57 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 07 Oct 2008 15:50:05 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21237 Archived-At: On 2008-10-07 17:15 +0200, Brent Goodrick wrote: > 1. M-x compile > 2. Enter in: sudo apt-get install gimp-help-en > 3. See the apt-get prompt: > Reading package lists... 0% > > The following extra packages will be installed: > gimp-help-common > The following NEW packages will be installed: > gimp-help-common gimp-help-en > 0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded. > Need to get 15.9MB of archives. > After this operation, 27.5MB of additional disk space will be used. > Do you want to continue [Y/n]? > 4. Kill the buffer, and expect the underlying process to die, just > like you would have if you had typed the above command in a shell > buffer. Won't work for processes run under sudo, see below. > 5. Open up a shell, and type ps to see that the apt-get process still > exists > 6. Go through step 1 again and notice now that a lock is being > reported by the second apt-get session because the first process > was not properly torn down by the act of killing the previous > compilation buffer. > > My assessment: The shell mode somehow works differently than the > compilation mode since the compilation mode does not allow user > input. Fair enough, but the two modes should work the same in terms of > tearing down the two processes if the buffers are killed, and should > not ever leave dormant child processes. The real problem is that sudo is suid root and thus the compilation process runs with superuser rights. Emacs is simply lacking the privileges to kill it. You can try something similar in your shell: ,---- | % sudo sleep 1000 & | [1] 2186 | % kill %1 | kill: kill %1 failed: operation not permitted | % sudo kill $(pidof sleep) | [1] + 2186 terminated sudo sleep 1000 | % `---- Sven