From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#30460: [PATCH] Remove :stop key from make-process. Date: Fri, 19 Apr 2019 13:06:43 +0200 Message-ID: <20190419110643.33444-1-phst@google.com> References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="64598"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Philipp Stephani , 30460@debbugs.gnu.org To: eliz@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 19 13:18:06 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hHRWv-000GiY-0u for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Apr 2019 13:18:05 +0200 Original-Received: from localhost ([127.0.0.1]:54946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHRWt-00067J-Vj for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Apr 2019 07:18:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHRVU-00050S-Eb for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2019 07:16:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHRNC-0007Kl-RJ for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2019 07:08:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58199) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHRNC-0007Ke-OX for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2019 07:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hHRNB-0002J7-O8 for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2019 07:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Apr 2019 11:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30460 X-GNU-PR-Package: emacs Original-Received: via spool by 30460-submit@debbugs.gnu.org id=B30460.15556720268784 (code B ref 30460); Fri, 19 Apr 2019 11:08:01 +0000 Original-Received: (at 30460) by debbugs.gnu.org; 19 Apr 2019 11:07:06 +0000 Original-Received: from localhost ([127.0.0.1]:43510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHRMI-0002Hc-2z for submit@debbugs.gnu.org; Fri, 19 Apr 2019 07:07:06 -0400 Original-Received: from mail-wr1-f41.google.com ([209.85.221.41]:41121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHRME-0002Gx-N8 for 30460@debbugs.gnu.org; Fri, 19 Apr 2019 07:07:04 -0400 Original-Received: by mail-wr1-f41.google.com with SMTP id c12so394026wrt.8 for <30460@debbugs.gnu.org>; Fri, 19 Apr 2019 04:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ohLG7kIMKkg+CowN/Ck6xntm8geTdVnpVr3McRMB4T4=; b=d5qHRYh40nasMqh41DEfAhDbbvdTAb9teqiaHljxmbFWPR/Dylw79+HhAVR5qINHdu r5ghCfz9oCNl9XKEvjWLM+mhdcclgiVVv9giU8ERG0OsGvUv/9M+Zi6WkTFHC4TSXai8 WzQKX6ybjMYjhZ0HCmSllx4a3ZI9B9LlgvDBWxDHn43/uD03asFaqKMdvHSBkSKJ/pFw LB0ffu+b0Sw8EDInAJDmSplDIbG6Drwjzs8U87pnywfmryJ5hibVzbdD1bE1F2cxeNle 2LUiDJ3gNJtdAFI1ldiG7qkwV+GAMyskFFaMpj2AtwKq8Q8mwsKPGDczlmKsdHyQu5BV i4aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ohLG7kIMKkg+CowN/Ck6xntm8geTdVnpVr3McRMB4T4=; b=Rt8NU3ToPkEVgOUD450ogLxxmDm6zGjH7S7NAqdhokX4MtT6sWSe/BeOtHTy9RhiMp kYAEFUl07g57qQ4NUAyFXUWMakKR3q1UpDQ5RDbfy1gZtcNojajy0aKDnJH6Y1ivD2jt pOIgk6+ZHuycBF2M5By1qBfxCcA/mmbY6mxTIA2q3Yp/CbZ0TNXvtJcBZsee6UQQNG7n Wc2JNZegtR7wUITyhXQALo+qlAflavx7mwuWEqBmukRsRGP+mqpstULtZ7JjCx8aVYzy HnG79uF3GFLTtbPARXtxA5QU67kIi5uW4emi27XNkRikBMAN6pd5kYwW40DHKALK5Nwb 5sTQ== X-Gm-Message-State: APjAAAWqxGLMNzXSY05NbH0aO/LaN1o9RV0fh6cJgLqr16vOKVqBxDpL twj1VU0eBckX+lgZm7RmOfU= X-Google-Smtp-Source: APXvYqwDuL3Aaltc93rgsf6pX52eFvy9Y4DTgcQJWQ1DffNQb6gJyZw6ZxnDtEzDp0xt0qijGUosFA== X-Received: by 2002:a05:6000:1d2:: with SMTP id t18mr830295wrx.221.1555672015708; Fri, 19 Apr 2019 04:06:55 -0700 (PDT) Original-Received: from p.fritz.box (p5B13F237.dip0.t-ipconnect.de. [91.19.242.55]) by smtp.gmail.com with ESMTPSA id u8sm4260637wrt.69.2019.04.19.04.06.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Apr 2019 04:06:54 -0700 (PDT) X-Google-Original-From: Philipp Stephani X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:157829 Archived-At: 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. + * 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)