Commit 24ddea07 authored by Charles A. Roelli's avatar Charles A. Roelli
Browse files

Improve process doc. with respect to handling of large input (Bug#33191)

* src/process.c (Fprocess_send_region, Fprocess_send_string):
Document that process input longer than the process input
buffer may be split into bunches.  Remove an outdated
reference to a 500 character split boundary.
* doc/lispref/processes.texi (Asynchronous Processes): Remove
mention of "stray character injections" in PTY processes.  See
also the comment about ICANON in src/sysdep.c, function
child_setup_tty.
parent 29310168
Pipeline #355 failed with stage
in 15 seconds
...@@ -604,10 +604,9 @@ these features. However, for subprocesses used by Lisp programs for ...@@ -604,10 +604,9 @@ these features. However, for subprocesses used by Lisp programs for
internal purposes (i.e., no user interaction with the subprocess is internal purposes (i.e., no user interaction with the subprocess is
required), where significant amounts of data need to be exchanged required), where significant amounts of data need to be exchanged
between the subprocess and the Lisp program, it is often better to use between the subprocess and the Lisp program, it is often better to use
a pipe, because pipes are more efficient, and because they are immune a pipe, because pipes are more efficient. Also, the total number of
to stray character injections that ptys introduce for large (around ptys is limited on many systems, and it is good not to waste them
500 byte) messages. Also, the total number of ptys is limited on many unnecessarily.
systems, and it is good not to waste them unnecessarily.
@defun make-process &rest args @defun make-process &rest args
This function is the basic low-level primitive for starting This function is the basic low-level primitive for starting
......
...@@ -6456,9 +6456,11 @@ DEFUN ("process-send-region", Fprocess_send_region, Sprocess_send_region, ...@@ -6456,9 +6456,11 @@ DEFUN ("process-send-region", Fprocess_send_region, Sprocess_send_region,
PROCESS may be a process, a buffer, the name of a process or buffer, or PROCESS may be a process, a buffer, the name of a process or buffer, or
nil, indicating the current buffer's process. nil, indicating the current buffer's process.
Called from program, takes three arguments, PROCESS, START and END. Called from program, takes three arguments, PROCESS, START and END.
If the region is more than 500 characters long, If the region is larger than the input buffer of the process (the
it is sent in several bunches. This may happen even for shorter regions. length of which depends on the process connection type and the
Output from processes can arrive in between bunches. operating system), it is sent in several bunches. This may happen
even for shorter regions. Output from processes can arrive in between
bunches.
If PROCESS is a non-blocking network process that hasn't been fully If PROCESS is a non-blocking network process that hasn't been fully
set up yet, this function will block until socket setup has completed. */) set up yet, this function will block until socket setup has completed. */)
...@@ -6489,9 +6491,10 @@ DEFUN ("process-send-string", Fprocess_send_string, Sprocess_send_string, ...@@ -6489,9 +6491,10 @@ DEFUN ("process-send-string", Fprocess_send_string, Sprocess_send_string,
doc: /* Send PROCESS the contents of STRING as input. doc: /* Send PROCESS the contents of STRING as input.
PROCESS may be a process, a buffer, the name of a process or buffer, or PROCESS may be a process, a buffer, the name of a process or buffer, or
nil, indicating the current buffer's process. nil, indicating the current buffer's process.
If STRING is more than 500 characters long, If STRING is larger than the input buffer of the process (the length
it is sent in several bunches. This may happen even for shorter strings. of which depends on the process connection type and the operating
Output from processes can arrive in between bunches. system), it is sent in several bunches. This may happen even for
shorter strings. Output from processes can arrive in between bunches.
If PROCESS is a non-blocking network process that hasn't been fully If PROCESS is a non-blocking network process that hasn't been fully
set up yet, this function will block until socket setup has completed. */) set up yet, this function will block until socket setup has completed. */)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment