---
name: "svwaitdown"
section: "8"
platform: "linux"
package: "runit"
version: "1.0.5-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/svwaitdown"
---

# svwaitdown(8)

waits for services controlled by runsv(8) or supervise(8) to be down

## NAME

svwaitdown - waits for services controlled by [runsv(8)](/runsv/8.md) or [supervise(8)](/supervise/8.md) to be down

## SYNOPSIS

**svwaitdown** \[ **-v** \] \[ **-k** \] \[ **-t** *sec* \] *services*

## DESCRIPTION

*services* consists of one or more arguments. Each *service* directory must start with a slash.

**svwaitdown** sends each *service* given at the command line the \`\`down'' command, and waits for it to become down. The *services* given at the command line must be controlled by [**runsv**(8)](/runsv/8.md), or [**supervise**(8)](/supervise/8.md).

**svwaitdown** blocks, limited by a *timeout*, until all *services* are down or reports errors.

## OPTIONS

- **-v**

  verbose. Print verbose messages to stderr.

- **-t *sec***

  Set the timeout for waiting for *services* to become down to *sec* seconds. *sec* must be between 2 and 6000. Default is 600 (10 minutes).

- **-k**

  Kill. If the timeout is reached before all *services* are down, tell the [**runsv**(8)](/runsv/8.md) processes to send the *services* a KILL signal.

- **-x**

  Exit. Send each *service* the \`\`exit'' command additionally to the \`\`down'' command, and wait for the corresponding [**runsv**(8)](/runsv/8.md) processes to exit instead for the *services* to be down.

## EXIT CODES

**svwaitdown** returns 0 as soon as all *services* are down.

If a *service* is usually controlled by **runsv (8)** or [**supervise**(8)](/supervise/8.md), but no supervisor process is currently running, **svwaitdown** treats this *service* as if it would be down.

For each *service* that causes an error while checking, **svwaitdown** increases the exit code by one and exits non zero. The maximum is 100.

**svwaitdown** returns 111 if the timeout *sec* was reached.

## SEE ALSO

[svwaitup(8)](/svwaitup/8.md), [runsv(8)](/runsv/8.md), [runsvctrl(8)](/runsvctrl/8.md), [runsvstat(8)](/runsvstat/8.md), [chpst(8)](/chpst/8.md), [svlogd(8)](/svlogd/8.md), [runit(8)](/runit/8.md), [runit-init(8)](/runit-init/8.md), [runsvdir(8)](/runsvdir/8.md), [runsvchdir(8)](/runsvchdir/8.md), [utmpset(8)](/utmpset/8.md)

 http://smarden.org/runit/\
  http://cr.yp.to/daemontools.html

## AUTHOR

Gerrit Pape \<pape@smarden.org\>
