Subject: bug#79079: 31.0.50; Piped command output is sometimes lost in Eshell

From: Eli Zaretskii <[email-masked]>
Date: Sun, 17 Aug 2025 08:03:40 +0300

> Date: Sat, 16 Aug 2025 16:54:57 -0700
> Cc: [email-masked], [email-masked], [email-masked]
> From: Jim Porter <[email-masked]>
> 
> +static FILE *
> +file_for_stream(Lisp_Object stream)
                 ^^
SPC missing there.

> +{
> +  CHECK_SYMBOL (stream);

Calls to CHECK_* should be made by the primitive itself, not by its
subroutine.  This is to allow the subroutines to be called where such
tests were already done, or are inappropriate.  The idea is that only
stuff exposed to Lisp validates the Lisp objects passed as arguments.

> +DEFUN ("internal-close-stream", Finternal_close_stream,

Nowadays we use "--" in the name of internal functions.  I suggest to
call this file--close-stream instead.

> +       Sinternal_close_stream, 1, 1, 0,
> +       doc: /* Close the file associated with STREAM.

This doesn't close the file, it closes the STREAM.  I suggest to
rephrase:

  Close the standard STREAM of the Emacs process.

P.S. I'd like to see what this does on Windows, where there's neither
SIGPIPE nor EPIPE, but that's a separate funeral.