# LibTmux.Control.child_spec/1

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/5bacf40788b43a5af27bb3656e727a921ba2db40/lib/libtmux/control.ex#L160
- **Page:** https://libtmux.org/en/elixir/pr-173/reference/libtmux-control-child_spec-1/

```
child_spec(options)
@spec child_spec([start_option()]) ::
        Supervisor.child_spec()
```

Builds a permanent supervisor child spec without attaching.

Prepares bounded detached inputs and one lifetime shared by all factory
invocations. Each invocation starts its own configured startup budget.
A restarted nonfresh lifetime returns an inert handle and never attaches
automatically. Proven retirement permits explicit `reconnect/2`; unknown
cleanup refuses it. Old handles never follow a replacement Root or Manager.

`Supervisor.start_child/2` and `Supervisor.restart_child/2` return the new
handle as their third info element. After an automatic restart, use
`Supervisor.terminate_child/2` followed by `Supervisor.restart_child/2` for
fresh info. This does not clear unknown cleanup or authorize replay.

See the [worked example](supervised-control.html).

## Parameters

- `options` (`[start_option()]`)

## Guides

Pages that discuss `child_spec/1`.

- [Execution ownership](/en/elixir/pr-173/topics/ownership/)
