diff options
| author | Philipp Stephani | 2019-04-21 18:09:38 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2019-04-22 16:07:27 +0200 |
| commit | 3b4e312cfe1e0b185fea58bc35fa951a8389c144 (patch) | |
| tree | c1003a30dc4a2b7fe8c78710f3c5156e4c18d571 | |
| parent | f9659e648cd06a9322b501168b1af8ede7d1ae16 (diff) | |
| download | emacs-3b4e312cfe1e0b185fea58bc35fa951a8389c144.tar.gz emacs-3b4e312cfe1e0b185fea58bc35fa951a8389c144.zip | |
Improve documentation around standard error pipes (Bug#35328).
* doc/lispref/processes.texi (Asynchronous Processes): Document
existence and properties of the standard error process.
(Accepting Output): Document that one has to accept output from the
standard error process separately.
| -rw-r--r-- | doc/lispref/processes.texi | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 7eb136af5f1..c08b14c72c5 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -701,6 +701,19 @@ created with @code{make-pipe-process}, described below. If | |||
| 701 | @var{stderr} is @code{nil}, standard error is mixed with standard | 701 | @var{stderr} is @code{nil}, standard error is mixed with standard |
| 702 | output, and both are sent to @var{buffer} or @var{filter}. | 702 | output, and both are sent to @var{buffer} or @var{filter}. |
| 703 | 703 | ||
| 704 | @cindex standard error process | ||
| 705 | If @var{stderr} is a buffer, Emacs will create a pipe process, the | ||
| 706 | @dfn{standard error process}. This process will have the default | ||
| 707 | filter (@pxref{Filter Functions}), sentinel (@pxref{Sentinels}), and | ||
| 708 | coding systems (@pxref{Default Coding Systems}). On the other hand, | ||
| 709 | it will use @var{query-flag} as its query-on-exit flag (@pxref{Query | ||
| 710 | Before Exit}). It will be associated with the @var{stderr} buffer | ||
| 711 | (@pxref{Process Buffers}) and send its output (which is the standard | ||
| 712 | error of the main process) there. | ||
| 713 | |||
| 714 | If @var{stderr} is a pipe process, Emacs will use it as standard error | ||
| 715 | process for the new process. | ||
| 716 | |||
| 704 | @item :file-handler @var{file-handler} | 717 | @item :file-handler @var{file-handler} |
| 705 | If @var{file-handler} is non-@code{nil}, then look for a file name | 718 | If @var{file-handler} is non-@code{nil}, then look for a file name |
| 706 | handler for the current buffer's @code{default-directory}, and invoke | 719 | handler for the current buffer's @code{default-directory}, and invoke |
| @@ -1882,6 +1895,19 @@ like this: | |||
| 1882 | (while (accept-process-output process)) | 1895 | (while (accept-process-output process)) |
| 1883 | @end example | 1896 | @end example |
| 1884 | 1897 | ||
| 1898 | If you have passed a non-@code{nil} @var{stderr} to | ||
| 1899 | @code{make-process}, it will have a standard error process. | ||
| 1900 | @xref{Asynchronous Processes}. In that case, waiting for process | ||
| 1901 | output from the main process doesn't wait for output from the standard | ||
| 1902 | error process. To make sure you have received both all of standard | ||
| 1903 | output and all of standard error from a process, use the following | ||
| 1904 | code: | ||
| 1905 | |||
| 1906 | @example | ||
| 1907 | (while (accept-process-output process)) | ||
| 1908 | (while (accept-process-output stderr-process)) | ||
| 1909 | @end example | ||
| 1910 | |||
| 1885 | @node Processes and Threads | 1911 | @node Processes and Threads |
| 1886 | @subsection Processes and Threads | 1912 | @subsection Processes and Threads |
| 1887 | @cindex processes, threads | 1913 | @cindex processes, threads |