From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44642: 27.1; read-string does not signal on EOF after calling server-eval-at Date: Sat, 14 Nov 2020 21:58:37 +0200 Message-ID: <83r1ovu2vm.fsf@gnu.org> References: <83v9e7u65p.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32588"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44642@debbugs.gnu.org To: Chris Hunt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 14 20:59:08 2020 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 1ke1hU-0008L6-Io for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Nov 2020 20:59:08 +0100 Original-Received: from localhost ([::1]:37238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ke1hT-0002Nj-Lj for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Nov 2020 14:59:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ke1hO-0002Nb-6F for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 14:59:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ke1hN-0005nC-TR for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 14:59:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ke1hN-00021B-RC for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 14:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Nov 2020 19:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44642 X-GNU-PR-Package: emacs Original-Received: via spool by 44642-submit@debbugs.gnu.org id=B44642.16053839407750 (code B ref 44642); Sat, 14 Nov 2020 19:59:01 +0000 Original-Received: (at 44642) by debbugs.gnu.org; 14 Nov 2020 19:59:00 +0000 Original-Received: from localhost ([127.0.0.1]:52078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ke1hL-00020w-Vu for submit@debbugs.gnu.org; Sat, 14 Nov 2020 14:59:00 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ke1hK-00020j-9j for 44642@debbugs.gnu.org; Sat, 14 Nov 2020 14:58:58 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60460) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ke1hE-0005mJ-0c; Sat, 14 Nov 2020 14:58:52 -0500 Original-Received: from [176.228.60.248] (port=2928 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ke1hB-0003sQ-K9; Sat, 14 Nov 2020 14:58:51 -0500 In-Reply-To: (message from Chris Hunt on Sat, 14 Nov 2020 14:42:30 -0500) 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:193328 Archived-At: > From: Chris Hunt > Date: Sat, 14 Nov 2020 14:42:30 -0500 > Cc: 44642@debbugs.gnu.org > > #3 getchar_unlocked () at /usr/include/x86_64-linux-gnu/bits/stdio.h:72 > len = 0 > line = 0x564dc6c07e30 "\240~\300\306MV" > val = > hide_char = > etty = { > main = { > c_iflag = 1107870600, > c_oflag = 3565618192, > c_cflag = 151023409, > c_lflag = 2300068360, > c_line = 131 '\203', > c_cc = > "i\000\314\002!\202l\000\325\002!)0\207\317\326\002\"\210\002\207\000\000\000\352\203\373?Z\227\323\300", > c_ispeed = 22093, > c_ospeed = 0 > } > } > size = 100 > etty_valid = 2 > val = > mini_frame = > minibuffer = > input_method = > enable_multibyte = > pos = 0 > histstring = > histval = > empty_minibuf = > dummy = > #4 read_minibuf_noninteractive (defalt=XIL(0), expflag=false, > prompt=) at minibuf.c:218 > len = 0 > line = 0x564dc6c07e30 "\240~\300\306MV" > val = > hide_char = > etty = { > main = { > c_iflag = 1107870600, > c_oflag = 3565618192, > c_cflag = 151023409, > c_lflag = 2300068360, > c_line = 131 '\203', > c_cc = > "i\000\314\002!\202l\000\325\002!)0\207\317\326\002\"\210\002\207\000\000\000\352\203\373?Z\227\323\300", > c_ispeed = 22093, > c_ospeed = 0 > } > } > size = 100 > etty_valid = 2 > val = > mini_frame = > minibuffer = > input_method = > enable_multibyte = > pos = 0 > histstring = > histval = > empty_minibuf = > dummy = [...] > Setting a breakpoint at minibuf.c:219 shows that line being hit > repeatedly. `errno` is 4 (EINTR). In that case, I see no bug here. read_minibuf_noninteractive calls 'getchar'; if that is interrupted by a signal, we retry the call; thus the infinite loop. In your case, I'm guessing that the signal is SIGPIPE, because the input of the Emacs process is from a pipe, and the other side of the pipe exited. If my analysis is correct, then your script setup needs to be modified to not trigger this condition.