package binsec

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t

A subprocess

val spawn : ?pdeathsig:int -> string array -> t

spawn ~pdeathsig command spawns the specified command in a new process. The command is searched in the path.

When given, the signal pdeathsig will be delivered to the child process if the current thread dies (implemented only on Linux). The process must be closed via close.

val pid : t -> int

pid t returns the process identifier.

val stdin : t -> out_channel

stdin t returns the channel bound to the subprocess stdin.

val stdout : t -> in_channel

stdout t returns the channel bound to the subprocess stdout.

val stderr : t -> in_channel

stderr t returns the channel bound to the subprocess stderr.

val close : t -> Unix.process_status

close t closes a process created with spawn.

Close stdin, stdout and stderr channels, wait for the associated command to terminate and return its termination status.

OCaml

Innovation. Community. Security.