Subject: bug#78784: closed (Re: bug#78784: [PATCH] Improve the documentation of the internal Lisp_Process->status field)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 14 Jun 2025 15:05:02 +0000

Your bug report

#78784: [PATCH] Improve the documentation of the internal Lisp_Process->status field

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78784: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78784
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#78784: [PATCH] Improve the documentation of the internal Lisp_Process->status field
From: Eli Zaretskii <[email-masked]>
To: Steven Allen <[email-masked]>
Cc: [email-masked]
Date: Sat, 14 Jun 2025 18:03:59 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Fri, 13 Jun 2025 07:54:54 -0700
> From:  Steven Allen via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Contrary to the existing documentation here, the value of this field
> cannot be the symbols open or closed. Furthermore, this field is never
> set to "stop" for network connections.

Thanks, installed on master, and closing the bug.

Subject: [PATCH] Improve the documentation of the internal Lisp_Process->status field
From: Steven Allen <[email-masked]>
To: [email-masked]
Date: Fri, 13 Jun 2025 07:54:54 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

Contrary to the existing documentation here, the value of this field
cannot be the symbols open or closed. Furthermore, this field is never
set to "stop" for network connections.

In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, cairo version
 1.18.4) of 2025-06-12 built on Laptop
Repository revision: 7bca4f75b1784c555f776910845fdb5c06224fc0
Repository branch: makepkg
Windowing system distributor 'The X.Org Foundation', version 11.0.12101016
System Description: Arch Linux

Configured using:
 'configure
 'CPPFLAGS=-I/run/user/1000/build/emacs-git/src/mps-git/build/include '
 'LDFLAGS=-L/run/user/1000/build/emacs-git/src/mps-git/build/lib -Wl,-O1
 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
 -Wl,-z,pack-relative-relocs -flto=auto' --prefix=/usr --sysconfdir=/etc
 --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man
 --with-gameuser=:games --with-modules --without-m17n-flt
 --without-selinux --without-pop --without-gconf --disable-gc-mark-trace
 --with-mps=yes --enable-link-time-optimization
 --with-native-compilation=yes --with-xinput2 --with-x-toolkit=no
 --without-toolkit-scroll-bars --without-xaw3d --without-gsettings
 --with-cairo-xcb --without-xft --with-sound=no --with-tree-sitter
 --without-gpm --without-compress-install
 '--program-transform-name=s/\([ec]tags\)/\1.emacs/'
 'CFLAGS=-march=native -mtune=native -O3 -pipe -fno-plt -fexceptions
 -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection -fomit-frame-pointer
 -fno-math-errno -fno-trapping-math -flto=auto' 'CXXFLAGS=-march=native
 -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3
 -Wformat -Werror=format-security -fstack-clash-protection
 -fcf-protection -fomit-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS
 -flto=auto''

>From 691b508753d8d2ebfc4b8670ba75d3898df95b79 Mon Sep 17 00:00:00 2001
From: Steven Allen <[email-masked]>
Date: Fri, 13 Jun 2025 07:51:37 -0700
Subject: [PATCH] Improve the documentation of the internal
 Lisp_Process->status field

Contrary to the existing documentation here, the value of this field
cannot be the symbols open or closed. Furthermore, this field is never
set to "stop" for network connections.

* src/process.h (Lisp_Process): improve/fix documentation of the status field.
---
 src/process.h | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/process.h b/src/process.h
index a27e95a9199..1e0ad8c7f68 100644
--- a/src/process.h
+++ b/src/process.h
@@ -83,13 +83,20 @@ #define EMACS_PROCESS_H
     Lisp_Object mark;
 
     /* Symbol indicating status of process.
-       This may be a symbol: run, open, closed, listen, or failed.
+       This may be a symbol: run, listen, or failed.
        Or it may be a pair (connect . ADDRINFOS) where ADDRINFOS is
        a list of remaining (PROTOCOL . ADDRINFO) pairs to try.
        Or it may be (failed ERR) where ERR is an integer, string or symbol.
        Or it may be a list, whose car is stop, exit or signal
        and whose cdr is a pair (EXIT_CODE . COREDUMP_FLAG)
-       or (SIGNAL_NUMBER . COREDUMP_FLAG).  */
+       or (SIGNAL_NUMBER . COREDUMP_FLAG).
+       The symbols open and closed are not used here: an open network
+       process has an internal status of "run" and a closed network
+       process an internal status of "exit".
+       Stopped network processes do not set this status to "stop";
+       instead, they set command to t. "stop" is only used here to
+       indicate stopped system processes.
+     */
     Lisp_Object status;
 
     /* Coding-system for decoding the input from this process.  */
-- 
2.49.0