@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998 Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999
+@c Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../info/processes
@node Processes, Display, Abbrevs, Top
@code{call-process}, above. If @var{destination} is the integer 0,
@code{call-process-region} discards the output and returns @code{nil}
immediately, without waiting for the subprocess to finish (this only
-works if asynchronous subprocess are supported).
+works if asynchronous subprocesses are supported).
The remaining arguments, @var{args}, are strings that specify command
line arguments for the program.
@end defun
@defun shell-command-to-string command
-@tindex shell-command-to-string
This function executes @var{command} (a string) as a shell command,
then returns the command's output as a string.
@end defun
@end defun
@defun process-contact process
-@tindex process-contact
This function returns @code{t} for an ordinary child process, and
@code{(@var{hostname} @var{service})} for a net connection
(@pxref{Network}).
@end defun
@defun process-coding-system process
-@tindex process-coding-system
This function returns a cons cell describing the coding systems in use
for decoding output from @var{process} and for encoding input to
@var{process} (@pxref{Coding Systems}). The value has this form:
@end defun
@defun set-process-coding-system process decoding-system encoding-system
-@tindex set-process-coding-system
This function specifies the coding systems to use for subsequent output
from and input to @var{process}. It will use @var{decoding-system} to
decode subprocess output, and @var{encoding-system} to encode subprocess
called the @dfn{filter function} can be called to act on the output. If
the process has no buffer and no filter function, its output is
discarded.
-
+
Output from a subprocess can arrive only while Emacs is waiting: when
reading terminal input, in @code{sit-for} and @code{sleep-for}
(@pxref{Waiting}), and in @code{accept-process-output} (@pxref{Accepting
can arrive before you finish, if the code in between does not call any
primitive that waits.
+ It is impossible to separate the standard output and standard error
+streams of the subprocess, because Emacs normally spawns the subprocess
+inside a pseudo-TTY, and a pseudo-TTY has only one output channel. If
+you want to keep the output to those streams separate, you should
+redirect one of them to a file--for example, by using an appropriate
+shell command.
+
Subprocess output is normally decoded using a coding system before the
buffer or filter function receives it, much like text read from a file.
You can use @code{set-process-coding-system} to specify which coding