Process
is used to create "subprocesses" or "child processes" of the Emacs process,
which is their "parent process". A subprocess of Emacs may be "synchronous" or
"asynchronous", depending on how it is created. When you create a synchronous
subprocess, the program waits for the subprocess to terminate before continuing
execution. When you create an asynchronous subprocess, it can run in parallel with
Emacs. This kind of subprocess is represented within Emacs by a Process.t
.
Programs can use this object to communicate with the subprocess or to control it. For
example, you can send signals, obtain status information, receive output from the
process, or send input to it.
(Info-goto-node "(elisp)Processes")
.
include sig ... end
val sexp_of_t : t ‑> Base.Sexp.t
include Value.Subtype with type t := t
We expose private value
for free identity conversions when the value is nested in
some covariant type, e.g. (symbols : Symbol.t list :> Value.t list)
rather than
List.map symbols ~f:Symbol.to_value
.
include sig ... end
val sexp_of_t : t ‑> Base.Sexp.t
eq t1 t2 = Value.eq (to_value t1) (to_value t2)
, i.e. eq
checks whether the
Emacs values underlying t1
and t2
are physically equal. This is different than
phys_equal t1 t2
, because we don't always wrap eq
Emacs values in phys_equal
OCaml values. I.e. phys_equal t1 t2
implies eq t1 t2
, but not the converse.
include Ecaml__.Valueable0.S with type t := t
val of_value_exn : Ecaml__.Value0.t ‑> t
val to_value : t ‑> Ecaml__.Value0.t
val command : t ‑> string list option
(describe-function 'process-buffer)
(describe-function 'process-command)
val pid : t ‑> Core_kernel.Pid.t option
(describe-function 'process-name)
(describe-function 'process-id)
val query_on_exit : t ‑> bool
(describe-function 'process-id)
(describe-function 'process-query-on-exit-flag)
val set_query_on_exit : t ‑> bool ‑> unit
set_query_on_exit t
specifies whether Emacs should query the user about killing t
when it exits. (describe-function 'set-process-query-on-exit-flag)
.
val find_by_name : string ‑> t option
(describe-function 'get-process)
(Info-goto-node "(elisp)Process Information")
module Call : sig ... end
val call_result_exn : ?input:Call.Input.t ‑> ?output:Call.Output.t ‑> ?redisplay_on_output:bool ‑> ?working_directory:Working_directory.t ‑> string ‑> string list ‑> Call.Result.t
(Info-goto-node "(elisp)Synchronous Processes")
(describe-function 'call-process)
val call_exn : ?input:Call.Input.t ‑> ?working_directory:Working_directory.t ‑> ?strip_whitespace:bool ‑> string ‑> string list ‑> string
call_exn
runs call_result_exn
, strips whitespace from stdout+stderr if
strip_whitespace
is true
, and returns the resulting string, raising on
nonzero exit.
val call_expect_no_output_exn : ?input:Call.Input.t ‑> ?working_directory:Working_directory.t ‑> ?strip_whitespace:bool ‑> string ‑> string list ‑> unit
call_expect_no_output_exn
runs call_result_exn
and raises if the command output is
not the empty string or on nonzero exit.
val shell_command_result : ?input:Call.Input.t ‑> ?output:Call.Output.t ‑> ?redisplay_on_output:bool ‑> ?working_directory:Working_directory.t ‑> string ‑> Call.Result.t
val shell_command_exn : ?input:Call.Input.t ‑> ?working_directory:Working_directory.t ‑> string ‑> string
shell_command_exn command
runs command
in a subshell, strips whitespace from
stdout+stderr, and returns the resulting string, raising on nonzero exit.
val create_unix_network_process : unit ‑> filter:(t ‑> Text.t ‑> unit) ‑> name:string ‑> socket_path:string ‑> t
(Info-goto-node "(elisp)Network Servers")
(describe-function 'make-network-process)
val kill : t ‑> unit
(Info-goto-node "(elisp)Deleting Processes")
, (describe-function
'delete-process)
.