# `Stdio.Op`
[🔗](https://github.com/msantos/stdio/blob/v0.4.6/lib/stdio/op.ex#L62)

Run a sequence of system calls on a process

# `option`
[🔗](https://github.com/msantos/stdio/blob/v0.4.6/lib/stdio/op.ex#L96)

```elixir
@type option() ::
  {:state, boolean()}
  | {:errexit, boolean()}
  | {:transform,
     (any() -&gt; :ok | {:ok, state :: any()} | {:error, :prx.posix()})}
```

Options to modify the behavior of an operation:

* `state`: pass `ok` 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)

# `t`
[🔗](https://github.com/msantos/stdio/blob/v0.4.6/lib/stdio/op.ex#L81)

```elixir
@type t() ::
  {atom(), list()}
  | {module(), atom(), list()}
  | {module(), atom(), list(), [option()]}
```

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}

# `task!`
[🔗](https://github.com/msantos/stdio/blob/v0.4.6/lib/stdio/op.ex#L111)

```elixir
@spec task!(
  Stdio.t(),
  ops :: [t() | [t()]],
  (init :: :prx.task() -&gt;
     {:ok, pipeline :: Stdio.pipeline()} | {:error, :prx.posix()}),
  (sh :: :prx.task() -&gt; any())
) :: Stdio.pipeline()
```

Creates and configures a new process from the supervisor process.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
