bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#44642: 27.1; read-string does not signal on EOF after calling server


From: Eli Zaretskii
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

> From: Chris Hunt <chrahunt@gmail.com>
> 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 = <optimized out>
>         hide_char = <optimized out>
>         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 = <optimized out>
>         mini_frame = <optimized out>
>         minibuffer = <optimized out>
>         input_method = <optimized out>
>         enable_multibyte = <optimized out>
>         pos = 0
>         histstring = <optimized out>
>         histval = <optimized out>
>         empty_minibuf = <optimized out>
>         dummy = <optimized out>
> #4  read_minibuf_noninteractive (defalt=XIL(0), expflag=false,
> prompt=<optimized out>) at minibuf.c:218
>         len = 0
>         line = 0x564dc6c07e30 "\240~\300\306MV"
>         val = <optimized out>
>         hide_char = <optimized out>
>         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 = <optimized out>
>         mini_frame = <optimized out>
>         minibuffer = <optimized out>
>         input_method = <optimized out>
>         enable_multibyte = <optimized out>
>         pos = 0
>         histstring = <optimized out>
>         histval = <optimized out>
>         empty_minibuf = <optimized out>
>         dummy = <optimized out>
[...]
> 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.





reply via email to

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