`sig
exception Fatal_error of exn
type environment
val create_env : unit -> Shell_sys.environment
val current_env : unit -> Shell_sys.environment
val copy_env : Shell_sys.environment -> Shell_sys.environment
val set_env : Shell_sys.environment -> string array -> unit
val get_env : Shell_sys.environment -> string array
val iter_env : f:(string -> unit) -> Shell_sys.environment -> unit
val set_env_var : Shell_sys.environment -> string -> string -> unit
val get_env_var : Shell_sys.environment -> string -> string
val iter_env_vars :
f:(string -> string -> unit) -> Shell_sys.environment -> unit
type command
val command :
?cmdname:string ->
?arguments:string array ->
?chdir:string ->
?environment:Shell_sys.environment ->
?descriptors:Unix.file_descr list ->
?assignments:(Unix.file_descr * Unix.file_descr) list ->
filename:string -> unit -> Shell_sys.command
exception Executable_not_found of string
val lookup_executable : ?path:string list -> string -> string
val get_cmdname : Shell_sys.command -> string
val get_arguments : Shell_sys.command -> string array
val get_chdir : Shell_sys.command -> string option
val get_environment : Shell_sys.command -> Shell_sys.environment
val get_descriptors : Shell_sys.command -> Unix.file_descr list
val get_assignments :
Shell_sys.command -> (Unix.file_descr * Unix.file_descr) list
val get_filename : Shell_sys.command -> string
val set_cmdname : Shell_sys.command -> string -> unit
val set_arguments : Shell_sys.command -> string array -> unit
val set_chdir : Shell_sys.command -> string option -> unit
val set_environment : Shell_sys.command -> Shell_sys.environment -> unit
val set_descriptors : Shell_sys.command -> Unix.file_descr list -> unit
val set_assignments :
Shell_sys.command -> (Unix.file_descr * Unix.file_descr) list -> unit
val set_filename : Shell_sys.command -> string -> unit
val copy_command : Shell_sys.command -> Shell_sys.command
val is_executable : Shell_sys.command -> bool
type process
type group_action =
New_bg_group
| New_fg_group
| Join_group of int
| Current_group
type fwd_mode = No_forward | Forward_to_process | Forward_to_group
val run :
?group:Shell_sys.group_action ->
?forward_mode:Shell_sys.fwd_mode ->
?pipe_assignments:(Unix.file_descr * Unix.file_descr) list ->
Shell_sys.command -> Shell_sys.process
val process_id : Shell_sys.process -> int
val status : Shell_sys.process -> Unix.process_status
val command_of_process : Shell_sys.process -> Shell_sys.command
val call : Shell_sys.command -> Shell_sys.process
val kill : ?signal:int -> Shell_sys.process -> unit
type job
type job_instance
val new_job : unit -> Shell_sys.job
val add_command : Shell_sys.command -> Shell_sys.job -> unit
val add_pipeline :
?bidirectional:bool ->
?src_descr:Unix.file_descr ->
?dest_descr:Unix.file_descr ->
src:Shell_sys.command -> dest:Shell_sys.command -> Shell_sys.job -> unit
val add_producer :
?descr:Unix.file_descr ->
producer:(Unix.file_descr -> bool) ->
Shell_sys.command -> Shell_sys.job -> unit
val from_string :
?pos:int ->
?len:int -> ?epipe:(unit -> unit) -> string -> Unix.file_descr -> bool
val from_stream :
?epipe:(unit -> unit) -> string Stream.t -> Unix.file_descr -> bool
val add_consumer :
?descr:Unix.file_descr ->
consumer:(Unix.file_descr -> bool) ->
Shell_sys.command -> Shell_sys.job -> unit
val to_buffer : Buffer.t -> Unix.file_descr -> bool
type group_mode = Same_as_caller | Foreground | Background
val run_job :
?mode:Shell_sys.group_mode ->
?forward_signals:bool -> Shell_sys.job -> Shell_sys.job_instance
class type ['a] job_handler_engine_type =
object
method abort : unit -> unit
method event_system : Unixqueue.event_system
method job : Shell_sys.job
method job_instance : Shell_sys.job_instance
method request_notification : (unit -> bool) -> unit
method state : 'a Uq_engines.engine_state
end
class job_engine :
Unixqueue.event_system ->
Shell_sys.job_instance -> [unit] job_handler_engine_type
val finish_job : Shell_sys.job_instance -> unit
val call_job :
?mode:Shell_sys.group_mode ->
?forward_signals:bool ->
?onerror:(Shell_sys.job_instance -> unit) ->
Shell_sys.job -> Shell_sys.job_instance
val processes : Shell_sys.job_instance -> Shell_sys.process list
exception No_Unix_process_group
val process_group_leader : Shell_sys.job_instance -> Shell_sys.process
val process_group_id : Shell_sys.job_instance -> int
type job_status =
Job_running
| Job_partially_running
| Job_ok
| Job_error
| Job_abandoned
val job_status : Shell_sys.job_instance -> Shell_sys.job_status
val kill_process_group : ?signal:int -> Shell_sys.job_instance -> unit
val kill_processes : ?signal:int -> Shell_sys.job_instance -> unit
val cancel_job : ?signal:int -> Shell_sys.job_instance -> unit
val abandon_job : ?signal:int -> Shell_sys.job_instance -> unit
exception Already_installed
val configure_job_handlers :
?catch_sigint:bool ->
?catch_sigquit:bool ->
?catch_sigterm:bool ->
?catch_sighup:bool -> ?at_exit:bool -> unit -> unit
val install_job_handlers : unit -> unit
module Debug : sig val enable : bool Pervasives.ref end
end`