View Source Stdio.Op (stdio v0.4.4)
Run a sequence of system calls on a process
Summary
Types
Options to modify the behavior of an operation
Operations consist of a list of tuples containing
Functions
Creates and configures a new process from the supervisor process.
Types
@type option() :: {:state, boolean()} | {:errexit, boolean()} | {:transform, (any() -> :ok | {:ok, state :: any()} | {:error, :prx.posix()})}
Options to modify the behavior of an operation:
state
: passok
result as the first parameter to the next operation (default: false)errexit
: abort operations on error (default: true)transform
: abort operations on error (default: true)
Operations consist of a list of tuples containing:
- an optional module name (default:
:prx
) - a function name
- a list of arguments
- an optional list of options to modify the behaviour of the operation
(see
t:option
)
Examples
{:setresuid, [1000,1000,1000]}
{:prx, :setresuid, [1000,1000,1000]}
{:prx, :setresuid, [1000,1000,1000], errexit: false}
Functions
@spec task!( Stdio.t(), ops :: [t() | [t()]], (init :: :prx.task() -> {:ok, pipeline :: Stdio.pipeline()} | {:error, :prx.posix()}), (sh :: :prx.task() -> any()) ) :: Stdio.pipeline()
Creates and configures a new process from the supervisor process.