[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 c9fdd1b: Improve accept-process-process doc
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] emacs-26 c9fdd1b: Improve accept-process-process doc |
Date: |
Thu, 27 Dec 2018 15:54:00 -0500 (EST) |
branch: emacs-26
commit c9fdd1b4965ebd02aa408f878320c4955f5e2cc7
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Improve accept-process-process doc
* doc/lispref/processes.texi (Accepting Output):
* src/process.c (Faccept_process_output):
Document that (accept-process-output P) can return non-nil
even after P has exited, and that it can return nil even if P
is still running (Bug#33839).
---
doc/lispref/processes.texi | 7 +++++--
src/process.c | 7 ++++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 623be09..2aca7f8 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -1795,7 +1795,8 @@ until output arrives from a process.
This function allows Emacs to read pending output from processes. The
output is given to their filter functions. If @var{process} is
address@hidden then this function does not return until some output
-has been received from @var{process}.
+has been received from @var{process} or @var{process} has closed the
+connection.
The arguments @var{seconds} and @var{millisec} let you specify timeout
periods. The former specifies a period measured in seconds and the
@@ -1820,7 +1821,9 @@ speech synthesis.
The function @code{accept-process-output} returns address@hidden if it
got output from @var{process}, or from any process if @var{process} is
address@hidden It returns @code{nil} if the timeout expired before output
address@hidden; this can occur even after a process has exited if the
+corresponding connection contains buffered data. The function returns
address@hidden if the timeout expired or the connection was closed before output
arrived.
@end defun
diff --git a/src/process.c b/src/process.c
index e306b2a..4dafee8 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4581,8 +4581,8 @@ DEFUN ("accept-process-output", Faccept_process_output,
Saccept_process_output,
0, 4, 0,
doc: /* Allow any pending output from subprocesses to be read by Emacs.
It is given to their filter functions.
-Optional argument PROCESS means do not return until output has been
-received from PROCESS.
+Optional argument PROCESS means to return only after output is
+received from PROCESS or PROCESS closes the connection.
Optional second argument SECONDS and third argument MILLISEC
specify a timeout; return after that much time even if there is
@@ -4594,7 +4594,8 @@ If optional fourth argument JUST-THIS-ONE is non-nil,
accept output
from PROCESS only, suspending reading output from other processes.
If JUST-THIS-ONE is an integer, don't run any timers either.
Return non-nil if we received any output from PROCESS (or, if PROCESS
-is nil, from any process) before the timeout expired. */)
+is nil, from any process) before the timeout expired or the
+corresponding connection was closed. */)
(Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec,
Lisp_Object just_this_one)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 c9fdd1b: Improve accept-process-process doc,
Paul Eggert <=