From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be Date: Wed, 12 Oct 2022 17:46:55 +0200 Message-ID: <87a661avtc.fsf@gnus.org> References: <2A45406C-33B5-4A42-88F8-001D53C7351D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39841"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 58440@debbugs.gnu.org, Morten Welinder , Eli Zaretskii To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 12 17:48:45 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oidyO-000A75-96 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Oct 2022 17:48:44 +0200 Original-Received: from localhost ([::1]:43776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oidyM-0000ef-Td for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Oct 2022 11:48:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oidxi-0000eE-Um for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2022 11:48:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oidxi-0002aO-LT for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2022 11:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oidxi-0001Gt-8Y for bug-gnu-emacs@gnu.org; Wed, 12 Oct 2022 11:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Oct 2022 15:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58440 X-GNU-PR-Package: emacs Original-Received: via spool by 58440-submit@debbugs.gnu.org id=B58440.16655896384727 (code B ref 58440); Wed, 12 Oct 2022 15:48:02 +0000 Original-Received: (at 58440) by debbugs.gnu.org; 12 Oct 2022 15:47:18 +0000 Original-Received: from localhost ([127.0.0.1]:58261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oidwv-0001E5-Gz for submit@debbugs.gnu.org; Wed, 12 Oct 2022 11:47:18 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:53066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oidwr-0001Dm-B0 for 58440@debbugs.gnu.org; Wed, 12 Oct 2022 11:47:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=CrVtvtvNwBrilxQqhEKUA+GeSjw44yXtrcEe/O9xwTU=; b=YIvo7LOmImQjB/j1S51cW+Vnp+ rgcxyvQdz2zvSX6W0OqaBvMaTQJ0fUUyuReI6CasUNrje84pYGteWqjCQ9t0+E/q5Lau8HueODp/8 1yKaw8fL6zMV02icHvKq2swkG+A/eSOFN+31gvpT0WSD31eovCAbCRJsIGTDbcFiiiCA=; Original-Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oidwh-0007pC-Pa; Wed, 12 Oct 2022 17:47:01 +0200 In-Reply-To: <2A45406C-33B5-4A42-88F8-001D53C7351D@gmail.com> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Wed, 12 Oct 2022 17:31:33 +0200") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJ cEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfmCgwPKykzMdceAAABl0lEQVRIx61Vy7HDMAhce9SU j9tEeqAiekgTFJNG3gEJC0m2k5nHJTFmgeXn7cCtiA6KHQ8i8iMAzIjy4J+jZoogEyiHGAHCd/9+ CjAABOoepcJsAjQOXj493RLah4mHXXLmAgAka+psYcKgpqTaeTMLM2u6YF6GXg5Jn6RJUwDYPrCh ++JhACje1Q0B4FVTynUWIedIFvxKLkh1X4mdnhjV2j7Ng2ZrGDQrPLcKmMSIqFCS62m1rtj2DGDq Fp8BXop5dB9SwvcAA1SgPB+rXFXJ+y9P+5AirLbvhoMO1QmALc1Nrxzt/M3+KsK1FNgiU20/8coa ofvLp6+wb0nu2nZ4La/KKUhtxzz0mXRrBhsHYKbBbo58sSKJ0qN7BM/hE3Ym2wHBsqXBNQ/UduAO McueGH0J0NWV/rcIBUgXy7yCVZMWjjNpc+PeoSA03uDi7rr7mDPQ9Jfj8BmuFwGAmkc471XMkGi/ zyrVkYJ5NNod95MfwkhO6d+4r9sgKPmW1BA6t6ZfoBU9Xa6VECUFsMFj646eX84/BS+GVEnRtQUA AAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMTAtMTJUMTU6NDM6NDErMDA6MDC+XuW+AAAAJXRFWHRk YXRlOm1vZGlmeQAyMDIyLTEwLTEyVDE1OjQzOjQxKzAwOjAwzwNdAgAAAABJRU5ErkJggg== X-Now-Playing: Severed Heads's _Under Gail Succubus_: "Three Doors" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245226 Archived-At: Mattias Engdeg=C3=A5rd writes: >> It does seem like a bug -- I'd expect a non-zero exit code in this case.= =20 > > It's by design, more or less: see handle_interrupt_signal in > keyboard.c. Whether that design is desired or not is a different > matter. > > (C-g should probably not generate a signal in the first place; it > creates more problems than it solves.) Hm, sounds like it... But looking at the code: ---- /* The SIGINT handler. If we have a frame on the controlling tty, we assume that the SIGINT was generated by C-g, so we call handle_interrupt. Otherwise, tell maybe_quit to kill Emacs. */ static void handle_interrupt_signal (int sig) ---- But if I=20 ./src/emacs -Q && echo 'OK' and then `C-g', that has no effect, but we still hit this logic? And even if: (./src/emacs -Q && echo 'OK' )& where the Emacs definitely isn't attached to the tty, then `C-g' in the terminal can't have any effect (and doesn't). But we still end up in this code? That seems like a bug, possibly?