Next: make-pipe-process, Up: Creating Asynchronous Subprocesses [Index]
This function is the basic low-level primitive for starting asynchronous subprocesses. It returns a process object representing the subprocess.
Compared to the more high-level start-process
, described below, it takes
keyword arguments, is more flexible, and allows to specify process filters and
sentinels in a single call.
The arguments ARGS are a list of keyword/argument pairs. Omitting a keyword is always equivalent to specifying it with value ‘nil’. Here are the meaningful keywords:
Use the string NAME as the process name; if a process with this name already exists, then NAME is modified (by appending ‘<1>’, etc.) to be unique.
Use BUFFER as the process buffer. If the value is ‘nil’, the subprocess is not associated with any buffer.
Use COMMAND as the command line of the process. The value should be a list starting with the program’s executable file name, followed by strings to give to the program as its arguments. If the first element of the list is ‘nil’, Emacs opens a new pseudoterminal (pty) and associates its input and output with BUFFER, without actually running any program; the rest of the list elements are ignored in that case.
If CODING is a symbol, it specifies the coding system to be used for both reading and writing of data from and to the connection. If CODING is a cons cell ‘(DECODING . ENCODING)’, then DECODING will be used for reading and ENCODING for writing. The coding system used for encoding the data written to the program is also used for encoding the command-line arguments (but not the program itself, whose file name is encoded as any other file name;
Initialize the type of device used to communicate with the subprocess. Possible values are ‘pty’ to use a pty, ‘pipe’ to use a pipe, or ‘nil’ to use the default derived from the value of the ‘process-connection-type’ variable. This parameter and the value of ‘process-connection-type’ are ignored if a non-‘nil’ value is specified for the ‘:stderr’ parameter; in that case, the type will always be ‘pipe’.
Initialize the process query flag to QUERY-FLAG.
If STOPPED is non-‘nil’, start the process in the stopped state.
Initialize the process filter to FILTER. If not specified, a default filter will be provided, which can be overridden later.
Initialize the process sentinel to SENTINEL. If not specified, a default sentinel will be used, which can be overridden later.
Associate STDERR with the standard error of the process. A non-‘nil’ value should be either a buffer or a pipe process created with ‘make-pipe-process’, described below.
The original argument list, modified with the actual connection information, is
available via the process-contact
function.
The current working directory of the subprocess is set to the current buffer’s
value of ‘default-directory’ if that is local (as determined by
‘unhandled-file-name-directory’), or "" otherwise. If you want to run a
process in a remote directory use ~start-file-process
.
Next: make-pipe-process, Up: Creating Asynchronous Subprocesses [Index]