---
name: "filter_wait"
section: "3"
platform: "linux"
package: "clearsilver-dev"
version: "0.10.5-6+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/filter_wait"
---

# filter\_wait(3)

wrap waitpid to decode the exitcode and why your filter quit

## NAME

filter\_wait  - wrap waitpid to decode the exitcode and why your filter quit

## SYNOPSIS

```
#include <util/filter.h>
```

```
NEOERR *filter_wait(pid_t pid, int options, int *exitcode);
```

## ARGUMENTS

pid -\> the process identifier to wait for\
 options -\> the options to pass to waitpid (see [wait(2)](/wait/2.md))

## DESCRIPTION

filter\_wait wraps the waitpid call and raises an error (with description) if the call failed.  Note that if the ask for the exitcode and the process exited with a code other than zero, we don't raise an error.  If you don't ask for the exitcode, and it is non-zero, we raise an error

## RETURN VALUE

exitcode -\> the exitcode if the process existed normally

## SEE ALSO

[**filter\_wait**(3)](/filter_wait/3.md), [**filter\_create\_fp**(3)](/filter_create_fp/3.md), **filter\_create\_fd**
