* bug#30460: 27.0.50; `process-command' of a stopped process is t
@ 2018-02-14 22:00 p.stephani2
2018-02-17 13:25 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: p.stephani2 @ 2018-02-14 22:00 UTC (permalink / raw)
To: 30460
(process-command
(make-process :name "sleep" :command '("sleep" "1h") :stop t))
returns t.
This is not documented (the docstring and the manual say that this
should only happen for a pipe, network, or serial connection), and
breaks M-x list-processes, which assumes that the return value of
`process-command' is a list for an ordinary process.
In GNU Emacs 27.0.50 (build 13, x86_64-pc-linux-gnu, GTK+ Version 3.22.24)
of 2018-02-14 built on localhost
Repository revision: 298275c595f6ca9e77f8131d34dda2b58fe1faa5
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description: Debian GNU/Linux buster/sid
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Configured using:
'configure --without-threads --enable-gcc-warnings=3Dwarn-only
--enable-gtk-deprecation-warnings --without-pop --with-mailutils
--enable-checking --enable-check-lisp-object-type --with-modules
'CFLAGS=3D-O0 -ggdb3''
Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY GNUTLS FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES JSON
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
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
blink-cursor-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 seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
mule-util 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 menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame 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 minibuffer
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 dbusbind inotify
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 95245 7945)
(symbols 48 20245 1)
(miscs 40 40 121)
(strings 32 28327 2301)
(string-bytes 1 757257)
(vectors 16 14137)
(vector-slots 8 499280 14010)
(floats 8 50 67)
(intervals 56 223 0)
(buffers 992 12))
--=20
Google Germany GmbH
Erika-Mann-Stra=C3=9Fe 33
80636 M=C3=BCnchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Halimah DeLaine Prado
If you received this communication by mistake, please don=E2=80=99t forward=
it to
anyone else (it may contain confidential or privileged information), please
erase all copies of it, including all attachments, and please let the sender
know it went to the wrong person. Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#30460: 27.0.50; `process-command' of a stopped process is t
2018-02-14 22:00 bug#30460: 27.0.50; `process-command' of a stopped process is t p.stephani2
@ 2018-02-17 13:25 ` Eli Zaretskii
2019-04-19 11:05 ` Philipp Stephani
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2018-02-17 13:25 UTC (permalink / raw)
To: p.stephani2; +Cc: 30460
> Date: Wed, 14 Feb 2018 23:00:26 +0100
> From: p.stephani2@gmail.com
>
>
> (process-command
> (make-process :name "sleep" :command '("sleep" "1h") :stop t))
>
> returns t.
>
> This is not documented (the docstring and the manual say that this
> should only happen for a pipe, network, or serial connection), and
> breaks M-x list-processes, which assumes that the return value of
> `process-command' is a list for an ordinary process.
":stop t" currently has no effect on a "real" process running a
command, because it is not generally possible to start a process in a
stopped state. So it's a Good Thing list-processes fails for such
bogus "processes" ;-)
We could fix this by either ignoring :stop in make-process, or by
signaling an error. The simplest change is just delete this snipper
from Fmake_process:
if (tem = Fplist_get (contact, QCstop), !NILP (tem))
pset_command (XPROCESS (proc), Qt);
The correct command was already set by that time, so the above just
overwrites the correct expected value.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#30460: 27.0.50; `process-command' of a stopped process is t
2018-02-17 13:25 ` Eli Zaretskii
@ 2019-04-19 11:05 ` Philipp Stephani
2019-04-19 11:06 ` bug#30460: [PATCH] Remove :stop key from make-process Philipp Stephani
0 siblings, 1 reply; 6+ messages in thread
From: Philipp Stephani @ 2019-04-19 11:05 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 30460
Am Sa., 17. Feb. 2018 um 14:25 Uhr schrieb Eli Zaretskii <eliz@gnu.org>:
>
> > Date: Wed, 14 Feb 2018 23:00:26 +0100
> > From: p.stephani2@gmail.com
> >
> >
> > (process-command
> > (make-process :name "sleep" :command '("sleep" "1h") :stop t))
> >
> > returns t.
> >
> > This is not documented (the docstring and the manual say that this
> > should only happen for a pipe, network, or serial connection), and
> > breaks M-x list-processes, which assumes that the return value of
> > `process-command' is a list for an ordinary process.
>
> ":stop t" currently has no effect on a "real" process running a
> command, because it is not generally possible to start a process in a
> stopped state. So it's a Good Thing list-processes fails for such
> bogus "processes" ;-)
>
> We could fix this by either ignoring :stop in make-process, or by
> signaling an error.
I prefer the second option for clarity and will send a patch in a moment.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#30460: [PATCH] Remove :stop key from make-process.
2019-04-19 11:05 ` Philipp Stephani
@ 2019-04-19 11:06 ` Philipp Stephani
2019-04-19 11:26 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Philipp Stephani @ 2019-04-19 11:06 UTC (permalink / raw)
To: eliz; +Cc: Philipp Stephani, 30460
This has never worked and caused issues such as Bug#30460.
* src/process.c (Fmake_process): Don't accept :stop key any more.
(syms_of_process): Define needed symbol 'null'.
* test/src/process-tests.el (make-process/stop): New unit test.
* doc/lispref/processes.texi (Asynchronous Processes): Remove :stop
key from manual.
---
doc/lispref/processes.texi | 4 ----
etc/NEWS | 3 +++
src/process.c | 13 ++++++-------
test/src/process-tests.el | 9 +++++++++
4 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 6be311b563..e9f9d64cc3 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -677,10 +677,6 @@ Asynchronous Processes
Initialize the process query flag to @var{query-flag}.
@xref{Query Before Exit}.
-@item :stop @var{stopped}
-If @var{stopped} is non-@code{nil}, start the process in the
-stopped state.
-
@item :filter @var{filter}
Initialize the process filter to @var{filter}. If not specified, a
default filter will be provided, which can be overridden later.
diff --git a/etc/NEWS b/etc/NEWS
index 3e3454bd93..4d76143b13 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1515,6 +1515,9 @@ The global value of 'indent-line-function', which defaults to
To get back the old behavior, add a function to 'text-mode-hook' which
performs (setq-local indent-line-function #'indent-relative).
+** 'make-process' no longer accepts a non-nil ':stop' key. This has
+never worked reliably, and now causes an error.
+
\f
* Lisp Changes in Emacs 27.1
diff --git a/src/process.c b/src/process.c
index 0c44037162..412ced58de 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1643,11 +1643,6 @@ ENCODING is used for writing.
:noquery BOOL -- When exiting Emacs, query the user if BOOL is nil and
the process is running. If BOOL is not given, query before exiting.
-:stop BOOL -- Start process in the `stopped' state if BOOL non-nil.
-In the stopped state, a process does not accept incoming data, but you
-can send outgoing data. The stopped state is cleared by
-`continue-process' and set by `stop-process'.
-
:connection-type TYPE -- TYPE is control type of device used to
communicate with subprocesses. Values are `pipe' to use a pipe, `pty'
to use a pty, or nil to use the default specified through
@@ -1746,8 +1741,10 @@ usage: (make-process &rest ARGS) */)
if (!query_on_exit)
XPROCESS (proc)->kill_without_query = 1;
- if (tem = Fplist_get (contact, QCstop), !NILP (tem))
- pset_command (XPROCESS (proc), Qt);
+ tem = Fplist_get (contact, QCstop);
+ /* Normal processes can't be started in a stopped state, see
+ Bug#30460. */
+ CHECK_TYPE (NILP (tem), Qnull, tem);
tem = Fplist_get (contact, QCconnection_type);
if (EQ (tem, Qpty))
@@ -8300,6 +8297,8 @@ returns non-`nil'. */);
"internal-default-interrupt-process");
DEFSYM (Qinterrupt_process_functions, "interrupt-process-functions");
+ DEFSYM (Qnull, "null");
+
defsubr (&Sprocessp);
defsubr (&Sget_process);
defsubr (&Sdelete_process);
diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index 0bb7ebe50a..b853f77946 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -284,5 +284,14 @@ process-tests--file-handler
(put #'process-tests--file-handler 'operations
'(unhandled-file-name-directory make-process))
+(ert-deftest make-process/stop ()
+ "Check that `make-process' doesn't accept a `:stop' key.
+See Bug#30460."
+ (should-error
+ (make-process :name "test"
+ :command (list (expand-file-name invocation-name
+ invocation-directory))
+ :stop t)))
+
(provide 'process-tests)
;; process-tests.el ends here.
--
2.20.1 (Apple Git-117)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#30460: [PATCH] Remove :stop key from make-process.
2019-04-19 11:06 ` bug#30460: [PATCH] Remove :stop key from make-process Philipp Stephani
@ 2019-04-19 11:26 ` Eli Zaretskii
2019-04-19 12:15 ` Philipp Stephani
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-04-19 11:26 UTC (permalink / raw)
To: Philipp Stephani; +Cc: phst, 30460
> From: Philipp Stephani <p.stephani2@gmail.com>
> Cc: 30460@debbugs.gnu.org,
> Philipp Stephani <phst@google.com>
> Date: Fri, 19 Apr 2019 13:06:43 +0200
>
> This has never worked and caused issues such as Bug#30460.
>
> * src/process.c (Fmake_process): Don't accept :stop key any more.
> (syms_of_process): Define needed symbol 'null'.
>
> * test/src/process-tests.el (make-process/stop): New unit test.
>
> * doc/lispref/processes.texi (Asynchronous Processes): Remove :stop
> key from manual.
Please don't remove that, but instead document that it's an error to
use that keyword.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#30460: [PATCH] Remove :stop key from make-process.
2019-04-19 11:26 ` Eli Zaretskii
@ 2019-04-19 12:15 ` Philipp Stephani
0 siblings, 0 replies; 6+ messages in thread
From: Philipp Stephani @ 2019-04-19 12:15 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Philipp Stephani, 30460-done
Am Fr., 19. Apr. 2019 um 13:27 Uhr schrieb Eli Zaretskii <eliz@gnu.org>:
>
> > From: Philipp Stephani <p.stephani2@gmail.com>
> > Cc: 30460@debbugs.gnu.org,
> > Philipp Stephani <phst@google.com>
> > Date: Fri, 19 Apr 2019 13:06:43 +0200
> >
> > This has never worked and caused issues such as Bug#30460.
> >
> > * src/process.c (Fmake_process): Don't accept :stop key any more.
> > (syms_of_process): Define needed symbol 'null'.
> >
> > * test/src/process-tests.el (make-process/stop): New unit test.
> >
> > * doc/lispref/processes.texi (Asynchronous Processes): Remove :stop
> > key from manual.
>
> Please don't remove that, but instead document that it's an error to
> use that keyword.
OK, I've reworded it a bit and pushed as 5c5e309527.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-04-19 12:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 22:00 bug#30460: 27.0.50; `process-command' of a stopped process is t p.stephani2
2018-02-17 13:25 ` Eli Zaretskii
2019-04-19 11:05 ` Philipp Stephani
2019-04-19 11:06 ` bug#30460: [PATCH] Remove :stop key from make-process Philipp Stephani
2019-04-19 11:26 ` Eli Zaretskii
2019-04-19 12:15 ` Philipp Stephani
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).