From unknown Tue Aug 19 02:53:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#48940 <48940@debbugs.gnu.org> To: bug#48940 <48940@debbugs.gnu.org> Subject: Status: 27.2; regression: "emacs --script /dev/stdin" parses the script incorrectly when /dev/stdin is a pipe Reply-To: bug#48940 <48940@debbugs.gnu.org> Date: Tue, 19 Aug 2025 09:53:02 +0000 retitle 48940 27.2; regression: "emacs --script /dev/stdin" parses the scri= pt incorrectly when /dev/stdin is a pipe reassign 48940 emacs submitter 48940 "Bryan C. Mills" severity 48940 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 09 18:46:20 2021 Received: (at submit) by debbugs.gnu.org; 9 Jun 2021 22:46:20 +0000 Received: from localhost ([127.0.0.1]:34844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lr6xm-0007HR-79 for submit@debbugs.gnu.org; Wed, 09 Jun 2021 18:46:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:36768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lr4s7-00086w-61 for submit@debbugs.gnu.org; Wed, 09 Jun 2021 16:32:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lr4s6-000097-St for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2021 16:32:18 -0400 Received: from mail-vs1-xe2b.google.com ([2607:f8b0:4864:20::e2b]:33709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lr4s3-0003F4-CC for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2021 16:32:17 -0400 Received: by mail-vs1-xe2b.google.com with SMTP id 126so703436vsi.0 for ; Wed, 09 Jun 2021 13:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=8sn7vsZOHg90lQy5W/GrHziR/UCCQWoVNREJcxOXMF4=; b=VFyrFAkj2FcocUieyuqo5gc9Pta92zVarch/87I/QDp+501qQlboOjYCqqi69z/nh3 Ev2fte3osCOtpwZ6Ety0ORZZVhNc7qK9IlPXh8BHqUJ2FXfJG4KfNo8u/9ZrveoSZSII 4vzNHhDEjhhEeZta8zAQ6GrYVgTXYF79wOA7gZc7r35X6IAA9bYRkAFkEdOpgLvnvEPC QuujQg9qH8GbrA2xds5NC8z+LcFmNGmeWGDEvG0zYMWp9Odlgw+tdx0BTXntrnqY9wYe HS0PIReENGbQpdC8Ly0rkahYbXa3qDoQN/Uao5KAfLP79IZZJCmVJffg3XqUERRp7lAf LS2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=8sn7vsZOHg90lQy5W/GrHziR/UCCQWoVNREJcxOXMF4=; b=oWo3DO46SbsUNUbKfojfkqjQBVGm5l/KxNqAOINg3i9OUolZdPzKhLMnKh2bYFVQ/l bkDXGYp1M0BQt0DqEO2eTRZCkq/cO1yGsd7F/pubZ2jl34NABJ2tAgwM9oK0V2RDZCbU ZlbXqTfnujBaFLqJt2xnKF61/TzQ7q/x5qYkjpvHfu6eVQmTlDGyXN+TiM9TrgoRoJ1M lIz8s3UwweHGTAn5XGdyfzwY3E4m6esYS3RH5rEk4lcHAXqpUuwt6daci9hBOjdLfImT aZs/gn7xeQRwO25YpIC+MZ2M3O1rKZPBwUbcG8EHq00tA3h/A1k9hPS+y3xhhAaa4966 8xIw== X-Gm-Message-State: AOAM532229fU36VOJRPTemqu71E2Q9ZNFJKywyUx4D6IOa3VsoJ6Hw3D A/TlYEXWhizMaJoxgues+mbmmkHPPISwPallJxg9+Wom7Knv4w== X-Google-Smtp-Source: ABdhPJxBrGFcOjhfN+jRPWUcGOUPBEHUJoP/WboHTF02pnW5VkCbWr1P+5JQvhaVcbQHv47EeoKavaJZI1OhIf85V1Q= X-Received: by 2002:a67:6505:: with SMTP id z5mr2223495vsb.43.1623270733002; Wed, 09 Jun 2021 13:32:13 -0700 (PDT) MIME-Version: 1.0 From: "Bryan C. Mills" Date: Wed, 9 Jun 2021 16:31:36 -0400 Message-ID: Subject: 27.2; regression: "emacs --script /dev/stdin" parses the script incorrectly when /dev/stdin is a pipe To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::e2b; envelope-from=bcmills@google.com; helo=mail-vs1-xe2b.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 09 Jun 2021 18:46:16 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) `emacs --script /dev/stdin` worked reliably for me on Emacs 24 through 26. As of Emacs 27, it no longer works reliably =E2=80=94 depending on the scri= pt contents, it either fails with spurious errors or silently exits without finishing the script. In the following bash interaction, all three emacs invocations *should* run the same script. The third invocation demonstrates the bug: when /dev/stdin is a pipe from `= cat` (instead of the script.el file directly), the script is no longer interpret= ed. With other scripts, I get various errors, seemingly due to `;` or `"` characters being dropped or ignored from the input. ``` $ cat script.el | cat /dev/stdin (print "Hello emacs!") $ emacs --no-init-file --no-site-file --script script.el "Hello emacs!" $ emacs --no-init-file --no-site-file --script /dev/stdin is undefined [2 times] Making completion list... [2 times] Configured using: 'configure --build x86_64-linux-gnu --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/google-emacs:/usr/local/share/google-emacs/2= 7.2+gg3+1.20210329.053400.rc147/site-lisp:/usr/local/share/google-emacs/sit= e-lisp:/usr/share/google-emacs/27.2+gg3+1.20210329.053400.rc147/site-lisp:/= usr/share/google-emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --program-prefix=3Dgoogle- --disable-silent-rules GOOGLE_VERSION=3D27.2+gg3+1.20210329.053400.rc147 --with-cairo --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars build_alias=3Dx86_64-linux-gnu 'CFLAGS=3D-g -O2 -ffile-prefix-map=3D/build/google-emacs-avRD2q/google-emacs-27.2+gg3+1.202= 10329.053400.rc147=3D. -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' LDFLAGS=3D-Wl,-z,relro 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' 'OBJCFLAGS=3D-g -O2 -ffile-prefix-map=3D/build/google-emacs-avRD2q/google-emacs-27.2+gg3+1.202= 10329.053400.rc147=3D. -fstack-protector-strong -Wformat -Werror=3Dformat-security'' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LC_ALL: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils vc-git diff-mode easymenu easy-mmode cl-loaddefs cl-lib term/tmux term/xterm xterm byte-opt gv bytecomp byte-compile cconv tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 53224 7924) (symbols 48 6747 1) (strings 32 17548 1920) (string-bytes 1 565159) (vectors 16 8089) (vector-slots 8 89351 7266) (floats 8 29 624) (intervals 56 241 3) (buffers 1000 13)) From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 13 06:26:37 2021 Received: (at 48940) by debbugs.gnu.org; 13 Jun 2021 10:26:37 +0000 Received: from localhost ([127.0.0.1]:42712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsNK8-0004PM-Sp for submit@debbugs.gnu.org; Sun, 13 Jun 2021 06:26:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsNK7-0004P6-AU for 48940@debbugs.gnu.org; Sun, 13 Jun 2021 06:26:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39070) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsNK1-0000a7-UO; Sun, 13 Jun 2021 06:26:29 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2339 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsNK1-0004Tf-I0; Sun, 13 Jun 2021 06:26:29 -0400 Date: Sun, 13 Jun 2021 13:26:23 +0300 Message-Id: <83pmwq6oxc.fsf@gnu.org> From: Eli Zaretskii To: "Bryan C. Mills" In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#48940: 27.2; regression: "emacs --script /dev/stdin" parses the script incorrectly when /dev/stdin is a pipe References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48940 Cc: 48940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 9 Jun 2021 16:31:36 -0400 > From: "Bryan C. Mills" via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > `emacs --script /dev/stdin` worked reliably for me on Emacs 24 through 26. > > As of Emacs 27, it no longer works reliably — depending on the script contents, > it either fails with spurious errors or silently exits without > finishing the script. > > > In the following bash interaction, all three emacs invocations > *should* run the same script. > The third invocation demonstrates the bug: when /dev/stdin is a pipe from `cat` > (instead of the script.el file directly), the script is no longer interpreted. > With other scripts, I get various errors, seemingly due to `;` or `"` > characters being > dropped or ignored from the input. > > ``` > $ cat script.el | cat /dev/stdin > (print "Hello emacs!") > > $ emacs --no-init-file --no-site-file --script script.el > > "Hello emacs!" > > $ emacs --no-init-file --no-site-file --script /dev/stdin > "Hello emacs!" > > $ cat script.el | emacs --no-init-file --no-site-file --script /dev/stdin > > $ echo $? > 0 > > $ > ``` > > This reproduces with the GNU Emacs 27.1 currently packaged on Debian Testing, > as well as the Google build of GNU Emacs 27.2 from which I produced > the report below. I see the problem, but it happens for me in Emacs 26 and Emacs 25 as well, so I'm not sure this is new, or why it works for you in older versions. Maybe Debian included some local patches in those older versions? (My old Emacs versions were built from the unmodified upstream sources.) AFAICS, the problem seems to be that load-with-code-conversion calls insert-file-contents, and the latter comes up with an empty buffer in the problematic case. It is notoriously hard to debug a program whose standard input was redirected from a pipe of another program, so I couldn't see why the above happens. If someone could step in a debugger through insert-file-contents in this case and describe what's going on there, or tell how to do that when Emacs is invoked like this, maybe we could make some progress. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 17:38:05 2021 Received: (at 48940) by debbugs.gnu.org; 14 Jun 2021 21:38:05 +0000 Received: from localhost ([127.0.0.1]:47881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsuHV-0002lJ-4g for submit@debbugs.gnu.org; Mon, 14 Jun 2021 17:38:05 -0400 Received: from mail-vk1-f173.google.com ([209.85.221.173]:35804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsuHT-0002kp-6X for 48940@debbugs.gnu.org; Mon, 14 Jun 2021 17:38:03 -0400 Received: by mail-vk1-f173.google.com with SMTP id l7so4486443vkk.2 for <48940@debbugs.gnu.org>; Mon, 14 Jun 2021 14:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=DPNT7zn+aYKGkqLQlopdVPD3NV7R04XBxUjFmzXGfgw=; b=ncQsYR6HwuvH/EwAtZgZlpvQC1cXs1iTHTXd0HCR8Fq1sIliyKyq8CGILmbHu1wnd7 AWf8K0+86ZnV0P0KeSgE+o317NJksnER2pR6JWiP1nGJF/eZ2f4FuRzwwnjG+X4jMWeI 54xTKoqKpA0+PBtxqDzRKSpsMKsYNWqJxeHLZlTx5Q4H5P4+C+NgdL/LUZ1X+17pPsE7 V5+IqyO548EhezPC55NGMitT2cWN+SswdhnPAufroj76ClxSrri5s87vtOVcZuDCpLz4 YZk9ffsEMt/jusI6/PvoBfuW3K+WVQVwOx70SSk6XzTECk/nRxV3yFyozo6jcDuBsCOE QqnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=DPNT7zn+aYKGkqLQlopdVPD3NV7R04XBxUjFmzXGfgw=; b=pgAQ346WFuLeU0OPghSXqfQhTm7KVSYUvNrxtIEFTPu1sgFPYAMvQMMgHxAEP6+k9/ 4pgqTdiv4p6O9ygwSdnVWr7GFLBwg8fe8rsl1oQAT5Hjcrvs8CoTYMewCdJ/WjQ0ygoz YscTJ7WvzXSMXyXA0MMS56KEOwjPHS1Hxz6dlCkN/4RoZZQoOgAjGIjrKiBg87BtNQJV SH2pRXWfP5aoVEcG5Z89ZdU6kPBv9G7ynZeEHRktluazlrGKfRvQwrbf3JKQA+0krcHE HkCqREj1cg7eOd5BKdvG058vEIsfeMiEeCgkH2lzN6RwTaUi0B8875R8J47SVQ6J1AYd h9wg== X-Gm-Message-State: AOAM5332c4eR8MJHAx63dR4YoufeymaNGcYbiNF0YRziempAe9rPJXkj kGI+SXtbPRUermCV8klRsQlqovbkLamTtLBT9b5tgkDdxO2iYA== X-Google-Smtp-Source: ABdhPJxzXGZ/GVa0aF4g0Ge9H69nX90gAZ5zmqn7Ykc0EnjxGA2swwQoDmTZDhvc2I+6nFzM7izB7EaaQre2hCGSH3Q= X-Received: by 2002:a1f:2a42:: with SMTP id q63mr1259316vkq.13.1623706677258; Mon, 14 Jun 2021 14:37:57 -0700 (PDT) MIME-Version: 1.0 References: <83pmwq6oxc.fsf@gnu.org> In-Reply-To: <83pmwq6oxc.fsf@gnu.org> From: "Bryan C. Mills" Date: Mon, 14 Jun 2021 17:37:17 -0400 Message-ID: Subject: Re: bug#48940: 27.2; regression: "emacs --script /dev/stdin" parses the script incorrectly when /dev/stdin is a pipe To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -8.0 (--------) X-Debbugs-Envelope-To: 48940 Cc: 48940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -9.0 (---------) I did a little digging and found that I can reproduce the issue under a debugger by constructing a named pipe with `mkfifo pipe.el` and feeding the script into it using `cat script.el >>pipe.el`. (Then I can execute `run --script pipe.el` under gdb to capture a backtrace at the problematic lseek call.) I identified one bug in the safe_to_load_version function. I think I've got a fix for it, but I'm not very familiar with the emacs codebase, especially when it comes to regression testing. (My patch against the emacs-27 branch is below.) I tested the fix locally with a small dummy script as input and it seems to work, but I can't be confident that there won't be deeper bugs. You're welcome to use it as a starting point for a more robust fix. >From c97e4b97af86023177417e49c46b19812b2f4caa Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Mon, 14 Jun 2021 17:30:11 -0400 Subject: [PATCH] Fix invocation with '--script /dev/stdin' * src/lread.c (safe_to_load_version): Check lseek errors. (Bug#48940) --- src/lread.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/lread.c b/src/lread.c index 47116ad5ae..96b6695b5c 100644 --- a/src/lread.c +++ b/src/lread.c @@ -990,12 +990,21 @@ #define UPDATE_BEG_END_STATE(ch) \ because of an incompatible change in the byte compiler. */ static int -safe_to_load_version (int fd) +safe_to_load_version (Lisp_Object file, int fd) { + struct stat st; char buf[512]; int nbytes, i; int version =3D 1; + /* If the file is not regular, then we cannot safely seek it. + Assume that it is not safe to load as a compiled file. */ + if (fstat(fd, &st) =3D=3D 0) + { + if (!S_ISREG (st.st_mode)) + return 0; + } + /* Read the first few bytes from the file, and look for a line specifying the byte compiler version used. */ nbytes =3D emacs_read_quit (fd, buf, sizeof buf); @@ -1013,7 +1022,9 @@ safe_to_load_version (int fd) version =3D 0; } - lseek (fd, 0, SEEK_SET); + if (lseek (fd, 0, SEEK_SET) < 0) + report_file_error ("Seeking to start of file", file); + return version; } @@ -1316,7 +1327,7 @@ DEFUN ("load", Fload, Sload, 1, 5, 0, if (is_elc /* version =3D 1 means the file is empty, in which case we can treat it as not byte-compiled. */ - || (fd >=3D 0 && (version =3D safe_to_load_version (fd)) > 1)) + || (fd >=3D 0 && (version =3D safe_to_load_version (file, fd)) > 1)) /* Load .elc files directly, but not when they are remote and have no handler! */ { @@ -1326,7 +1337,7 @@ DEFUN ("load", Fload, Sload, 1, 5, 0, int result; if (version < 0 - && ! (version =3D safe_to_load_version (fd))) + && ! (version =3D safe_to_load_version (file, fd))) { safe_p =3D 0; if (!load_dangerous_libraries) --=20 2.32.0.272.g935e593368-goog On Sun, Jun 13, 2021 at 6:26 AM Eli Zaretskii wrote: > > > Date: Wed, 9 Jun 2021 16:31:36 -0400 > > From: "Bryan C. Mills" via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > > > > `emacs --script /dev/stdin` worked reliably for me on Emacs 24 through = 26. > > > > As of Emacs 27, it no longer works reliably =E2=80=94 depending on the = script contents, > > it either fails with spurious errors or silently exits without > > finishing the script. > > > > > > In the following bash interaction, all three emacs invocations > > *should* run the same script. > > The third invocation demonstrates the bug: when /dev/stdin is a pipe fr= om `cat` > > (instead of the script.el file directly), the script is no longer inter= preted. > > With other scripts, I get various errors, seemingly due to `;` or `"` > > characters being > > dropped or ignored from the input. > > > > ``` > > $ cat script.el | cat /dev/stdin > > (print "Hello emacs!") > > > > $ emacs --no-init-file --no-site-file --script script.el > > > > "Hello emacs!" > > > > $ emacs --no-init-file --no-site-file --script /dev/stdin > > > "Hello emacs!" > > > > $ cat script.el | emacs --no-init-file --no-site-file --script /dev/std= in > > > > $ echo $? > > 0 > > > > $ > > ``` > > > > This reproduces with the GNU Emacs 27.1 currently packaged on Debian Te= sting, > > as well as the Google build of GNU Emacs 27.2 from which I produced > > the report below. > > I see the problem, but it happens for me in Emacs 26 and Emacs 25 as > well, so I'm not sure this is new, or why it works for you in older > versions. Maybe Debian included some local patches in those older > versions? (My old Emacs versions were built from the unmodified > upstream sources.) > > AFAICS, the problem seems to be that load-with-code-conversion calls > insert-file-contents, and the latter comes up with an empty buffer in > the problematic case. > > It is notoriously hard to debug a program whose standard input was > redirected from a pipe of another program, so I couldn't see why the > above happens. If someone could step in a debugger through > insert-file-contents in this case and describe what's going on there, > or tell how to do that when Emacs is invoked like this, maybe we > could make some progress. > > Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 24 03:27:49 2021 Received: (at control) by debbugs.gnu.org; 24 Oct 2021 07:27:49 +0000 Received: from localhost ([127.0.0.1]:37815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meXv3-0007LI-Et for submit@debbugs.gnu.org; Sun, 24 Oct 2021 03:27:49 -0400 Received: from mail-pj1-f41.google.com ([209.85.216.41]:38750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meXv0-0007Kc-7I for control@debbugs.gnu.org; Sun, 24 Oct 2021 03:27:46 -0400 Received: by mail-pj1-f41.google.com with SMTP id o4-20020a17090a3d4400b001a1c8344c3fso6832107pjf.3 for ; Sun, 24 Oct 2021 00:27:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=AXeS05jF/ZpEu0MHmPtFyvugv+AIZqauFxi1Gwx9wGk=; b=lrtYMeuh/DFv+3X4HkQpjQ5Twj7QwmEWjDr6MrC2mnmrKv+AB/6JnkcT01GecO7IDI f62ojO74lw4cdUCJXxZy172VsVmXM5hs6bmvrMYC2hGfXLqZjxbSsIc024OTHYj6Vo5K 9XP+1mz62b0pe8qirFfSSf+ns8NOAo5h3G7fg56PNkoQ9Ie0eh7tNcjtzEmpcPlN9d6L s+B0lvbigcKqfQCxZK9LJug54k7akSP+eRCv/Frsmw6q1NYNJQweMXtDOyXYythYXjbE sgChsG4LZuNAPFUFdxECPEKp1TYZ7+QEPMq4660mv+XKzW5WjotUOmHOTarWQZpMiFNU yLvQ== X-Gm-Message-State: AOAM533iuch0EW7/M/lK3fA8+IR3So9RMs0hG+E7NpTOIqaCf5Fn0tZy wRYKPsh3IP/16M/JkBYvmqWEM8PHfRFraMzEMNuYwCJh X-Google-Smtp-Source: ABdhPJwr3Y0zwFhZhpRvoE1sUV5QLJpKJg5PInfCXEZyhrLiR9NlacxQEGsY/YQySFUEPNANJZY4uO9vwDOGxiP3ytE= X-Received: by 2002:a17:90b:17d2:: with SMTP id me18mr26538480pjb.132.1635060460678; Sun, 24 Oct 2021 00:27:40 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 24 Oct 2021 00:27:40 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Sun, 24 Oct 2021 00:27:40 -0700 Message-ID: Subject: control message for bug #48940 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) tags 48940 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 11 00:09:14 2021 Received: (at 48940) by debbugs.gnu.org; 11 Nov 2021 05:09:14 +0000 Received: from localhost ([127.0.0.1]:39819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ml2Kn-0007if-Nw for submit@debbugs.gnu.org; Thu, 11 Nov 2021 00:09:13 -0500 Received: from quimby.gnus.org ([95.216.78.240]:49884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ml2Kl-0007iO-Aj for 48940@debbugs.gnu.org; Thu, 11 Nov 2021 00:09:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=6ENkY5lqxDOQJN//PLkgu/iD+83Ea/plKRe94IF0OLI=; b=Ok33ZqF/KWP8+N85QSpD08Abrg bbmrrU7lo1duaHEUhOWvsTG7jC9imbpisN4jGtcYJgz7zfMK6qyYg8u16K5tqRsBKYauJXsH00nlI 7g9bCSCIz8bOjiSMroM4me1drnZlvMFUHOi1goAF4oJgr7TAFWvHzNH8NkCMk476Pg6c=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ml2Kb-0002Tq-V8; Thu, 11 Nov 2021 06:09:04 +0100 From: Lars Ingebrigtsen To: "Bryan C. Mills" Subject: Re: bug#48940: 27.2; regression: "emacs --script /dev/stdin" parses the script incorrectly when /dev/stdin is a pipe References: <83pmwq6oxc.fsf@gnu.org> X-Now-Playing: King Crimson's _The Complete 1969 Recordings (26): BBC Sessions_: "21st Century Schizoid Man" Date: Thu, 11 Nov 2021 06:09:00 +0100 In-Reply-To: (Bryan C. Mills's message of "Mon, 14 Jun 2021 17:37:17 -0400") Message-ID: <87k0hfb7o3.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: "Bryan C. Mills" writes: > I tested the fix locally with a small dummy script as input and it > seems to work, but I can't be confident that there won't be deeper > bugs. You're welcome to use it as a starting point for a mor [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48940 Cc: Eli Zaretskii , 48940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Bryan C. Mills" writes: > I tested the fix locally with a small dummy script as input and it > seems to work, but I can't be confident that there won't be deeper > bugs. You're welcome to use it as a starting point for a more robust > fix. I tried (on Debian/bullseye with Emacs 29), but it doesn't seem to make any difference here. With or without the patch, I get: larsi@xo:~/src/emacs/trunk$ emake; cat /tmp/script.el | ./src/emacs -Q --script /dev/stdin Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "/proc/162231/fd/pipe:[1065564]") load("/proc/162231/fd/pipe:[1065564]" nil t t) command-line-1(("-scriptload" "/dev/stdin")) command-line() normal-top-level() Perhaps something further has changed in the meantime? (You didn't post an output of the error message you were getting...) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 11 00:09:23 2021 Received: (at control) by debbugs.gnu.org; 11 Nov 2021 05:09:23 +0000 Received: from localhost ([127.0.0.1]:39822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ml2Kx-0007j3-0c for submit@debbugs.gnu.org; Thu, 11 Nov 2021 00:09:23 -0500 Received: from quimby.gnus.org ([95.216.78.240]:49904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ml2Ku-0007in-Mt for control@debbugs.gnu.org; Thu, 11 Nov 2021 00:09:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qORC5E30byOej9nCbbiw8d2Mk2y0WIBlBtT3l+HMrHM=; b=Ku0Dp+4/8HQOXJRncYJeel6fRA q48mlZ9G4QdjfsAuK8pS0Ag3g6UGgTvYBOA2eV9tkJrNHvMhlJKBIAzOCsygwNzG66N5YS5Y0ENpi D68y4hSbkrCkFs4eCpJCwHHRJLQtEARVmNrcFZI3+cguQyj5o2/36Fd3me3AW+9Hm1Ko=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ml2Km-0002Uw-Qo for control@debbugs.gnu.org; Thu, 11 Nov 2021 06:09:15 +0100 Date: Thu, 11 Nov 2021 06:09:12 +0100 Message-Id: <87ilwzb7nr.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #48940 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 48940 - patch quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 48940 - patch quit From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 11 12:24:22 2021 Received: (at 48940) by debbugs.gnu.org; 11 Nov 2021 17:24:22 +0000 Received: from localhost ([127.0.0.1]:42142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlDoE-0004Zu-18 for submit@debbugs.gnu.org; Thu, 11 Nov 2021 12:24:22 -0500 Received: from mail-ua1-f49.google.com ([209.85.222.49]:43837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlDoC-0004Zg-9Y for 48940@debbugs.gnu.org; Thu, 11 Nov 2021 12:24:20 -0500 Received: by mail-ua1-f49.google.com with SMTP id v3so13289744uam.10 for <48940@debbugs.gnu.org>; Thu, 11 Nov 2021 09:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=LXCKPpJZ+Zd6TtYZwr510kAMBVJEybkkTYSYI0jNauY=; b=bEOzyJKsG3KXHEkQohJ4fkRaSJaBvtCFQjzywbCUz18O4axZhb7+r5ugw2DPNtc2Hf wKR93aRsurW4bE+EpJtN2NqloHbQHYCbRdZDB3Xe1S1gP5aLnKH8I8jHQjH4lY0S85HH LaKJnqKU16+pT4J/26e6zIqGhU+DS1UMxuBqPlIeHWaXbkfgkuoawc+4UUNtACPWHpZl nveXYonS3/zmseNekYRoWF6aiaD8LU2q9laVm8spZmQ2Y95As0MD43xnKhG4+2nkveOi pzd/oeFvqE3j2BLQfW4VV5/ezmgUAU3b0p0xYg1/3dI6GqdVjmHz+4ycxyKX4Sy8XFNl 02sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=LXCKPpJZ+Zd6TtYZwr510kAMBVJEybkkTYSYI0jNauY=; b=nPbO1za3aI1255f5X9p3kI+IRc8SJEHx9pXm9dOtFq4RjCPEonAjiuOHAm6vmejC/e hQxm9aELbmpDKiOcMFFmgMyk4FknSgKaM6JEnJei/3aaXgsU4c8PGJCoWdwf2+BiAWcp FN0fZwIRdyTTrV2n0Ll/YSy6CsrbpkiJwPTRSr0mS6JRMOoIf0wCUcOQKzV30ElnhAbe +OdhN2Xds8Jz92isBAUg8ghrSnzikmKEkKAFwWR1yORqdF/Gew6g0gsrKrvYd3dVTLQu o+8pqRVdGqIpX8plbihNeq9ONbub90FPLMMqsVM64agjvLkzZRzSJ7JV7LpD6p6r08Oh 5HQA== X-Gm-Message-State: AOAM532d/CSNZVYheXQKFPnHrcjHuTkViZOSjo9W3YewjSuc7oeIgIQt ivhBdViZNP4zDTHGDaPPslXq9iJcx/bQB1/y18UVYobhIOw= X-Google-Smtp-Source: ABdhPJyHNv0g6nANsrkd+yD/3CnD00hUs1vHp3ZTyFWeHDTZkC+Xu6gXjvMundboKZ4aH3zZsipanLRkyv55+1Farq8= X-Received: by 2002:a05:6102:3f4c:: with SMTP id l12mr396646vsv.7.1636651454331; Thu, 11 Nov 2021 09:24:14 -0800 (PST) MIME-Version: 1.0 References: <83pmwq6oxc.fsf@gnu.org> <87k0hfb7o3.fsf@gnus.org> In-Reply-To: <87k0hfb7o3.fsf@gnus.org> From: "Bryan C. Mills" Date: Thu, 11 Nov 2021 12:23:38 -0500 Message-ID: Subject: Re: bug#48940: 27.2; regression: "emacs --script /dev/stdin" parses the script incorrectly when /dev/stdin is a pipe To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -8.0 (--------) X-Debbugs-Envelope-To: 48940 Cc: Eli Zaretskii , 48940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -9.0 (---------) On Thu, Nov 11, 2021 at 12:09 AM Lars Ingebrigtsen wrote: > > "Bryan C. Mills" writes: > > > I tested the fix locally with a small dummy script as input and it > > seems to work, but I can't be confident that there won't be deeper > > bugs. You're welcome to use it as a starting point for a more robust > > fix. > > I tried (on Debian/bullseye with Emacs 29), but it doesn't seem to make > any difference here. With or without the patch, I get: > > larsi@xo:~/src/emacs/trunk$ emake; cat /tmp/script.el | ./src/emacs -Q --= script /dev/stdin > Debugger entered--Lisp error: (file-missing "Cannot open load file" "No s= uch file or directory" "/proc/162231/fd/pipe:[1065564]") > load("/proc/162231/fd/pipe:[1065564]" nil t t) > command-line-1(("-scriptload" "/dev/stdin")) > command-line() > normal-top-level() > > Perhaps something further has changed in the meantime? (You didn't post > an output of the error message you were getting...) I did post the complete output: the pipeline `cat script.el | emacs --no-init-file --no-site-file --script /dev/stdin` did not produce any output whatsoever for my reproducer. (Nothing to stdout, nothing to stderr.) Since the return-value from lseek was ignored prior to my patch, the failing seek did not necessarily lead to a diagnosed error at all =E2=80=94= it could instead result in a spurious EOF on the next read, or a parse error from unintentionally continuing to read the file at the unmodified (pre-lseek) offset. I don't know what else may have regressed between when I mailed the patch and when you looked at it in Emacs 29, and unfortunately I don't have the time to look into it at the moment. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 11 22:27:06 2021 Received: (at 48940) by debbugs.gnu.org; 12 Nov 2021 03:27:06 +0000 Received: from localhost ([127.0.0.1]:42776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlNDW-0007id-Fx for submit@debbugs.gnu.org; Thu, 11 Nov 2021 22:27:06 -0500 Received: from quimby.gnus.org ([95.216.78.240]:60382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlNDU-0007i5-RJ for 48940@debbugs.gnu.org; Thu, 11 Nov 2021 22:27:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=AUHcgQAtnWPtndXWzTJ0hD82zKFdKQyC/8xwqLBAY68=; b=cr6a+gK8xtjB5p0jvCEJk3RWz/ V2miXro8t7qNujn/a6TjP1zxNCwT3lO78fAAzu+XpwNFkzKiWoPrKFAr7UGyqQ5vq/37p5iClbMwi 3aBZgd6GFiK422gBkZETZR70ki4SLe0aAqCOqV44aBiGHXwO+SrvXO6oXNytwj9lWUCk=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mlNDL-0003dr-RH; Fri, 12 Nov 2021 04:26:58 +0100 From: Lars Ingebrigtsen To: "Bryan C. Mills" Subject: Re: bug#48940: 27.2; regression: "emacs --script /dev/stdin" parses the script incorrectly when /dev/stdin is a pipe References: <83pmwq6oxc.fsf@gnu.org> <87k0hfb7o3.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXf399/foAkJCb/ //8aMSjyAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+ULDAIxCQtexUAAAAGFSURBVCjPhZLNboJAFIUP BIiykkRMOyvTaNLwFEOjXWMiprLqwiZ1noJ20TUuNCkr2ohh7lP2zmDTZWc13z2XOfcH4O+M4KzS aOzH4zW8DL6XRojyKDOag+UCqQf4BQGrSEo4G6KcAxyMFR3z0uYVpNexqhu+k2YZ8zxeQyJzNhpI sVpyPhKqK1z2Fy35E6JTh8vnyxMLLrWHOQ5EHZcTqBIusg86szJUC6eWMyQHhoHaK8IUQ+PptaKd yGnfxFjevamSJFsCAkrrgCounz1vEv0aUGfuEIOwGrmkHiqGrX/LkaOyPrIQQGgrADb0KCEaZUHV 7yUmTULcCPank0bIQEb55gT3CgkdMziNsMAzyEeD54C4IhAbJJpteyCZkOm+tKCFhcpC5SvJ0PRp CA2cLQDBmR/QV8XtemgL84xROtv6Hpgx7Mzy/C33H1Ar7bR2DL6qS2Eg4MX4okBid5chGwZLhBZ2 rKawSp7zapyvGWI7SLGAJ8cmKeZ53//+PixlI/xzfgA4zIj9xqxzCwAAACV0RVh0ZGF0ZTpjcmVh dGUAMjAyMS0xMS0xMlQwMjo0OTowOSswMDowMBA//9wAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEt MTEtMTJUMDI6NDk6MDkrMDA6MDBhYkdgAAAAAElFTkSuQmCC X-Now-Playing: Sonic Youth's _Goo_: "Cinderella's Big Score" Date: Fri, 12 Nov 2021 04:26:55 +0100 In-Reply-To: (Bryan C. Mills's message of "Thu, 11 Nov 2021 12:23:38 -0500") Message-ID: <87y25u2gw0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: "Bryan C. Mills" writes: > I did post the complete output: the pipeline `cat script.el | emacs > --no-init-file --no-site-file --script /dev/stdin` did not produce any > output whatsoever for my reproducer. (Nothing to stdout [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48940 Cc: Eli Zaretskii , 48940@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Bryan C. Mills" writes: > I did post the complete output: the pipeline `cat script.el | emacs > --no-init-file --no-site-file --script /dev/stdin` did not produce any > output whatsoever for my reproducer. (Nothing to stdout, nothing to > stderr.) Ah, I see. I tracked down what's causing this new problem and fixed that, and after doing that, I can confirm that your patch fixes the problem with /dev/stdin-as-a-pipe, so I've pushed it to Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 11 22:27:15 2021 Received: (at control) by debbugs.gnu.org; 12 Nov 2021 03:27:15 +0000 Received: from localhost ([127.0.0.1]:42779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlNDf-0007j6-Mn for submit@debbugs.gnu.org; Thu, 11 Nov 2021 22:27:15 -0500 Received: from quimby.gnus.org ([95.216.78.240]:60400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlNDd-0007im-LO for control@debbugs.gnu.org; Thu, 11 Nov 2021 22:27:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gbiziui2wX0Mq4CWjPl/Q5hgaKnEiXmdy31yvMEr+Ss=; b=fIOymLF+FsjKufp+CtapnHrhzy WytN9RnJnYnjpZb0XtSuD6E1oM8xXMiQEbtV669XOp54LXiTQOjZnvCYlET8SeuSOeeZPm7PuVMh8 AJu70S4eIUfJCs1c3YPPDNpqVit8sSLw2XCex8OKK8WYWrnyzDsG3pLvGHO33tWQCBts=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mlNDV-0003e4-ID for control@debbugs.gnu.org; Fri, 12 Nov 2021 04:27:08 +0100 Date: Fri, 12 Nov 2021 04:27:05 +0100 Message-Id: <87wnle2gvq.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #48940 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 48940 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 48940 29.1 quit From unknown Tue Aug 19 02:53:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 10 Dec 2021 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator