filter_wait(3)
π filter_wait(3) π
okay bestie, you found your way into util/filter.h β welcome, this is the part of the manual where we deal with feelings about child processes. Also it's a section-3 page, so it's a library call. Pull up a chair. π
β¨ NAME β¨
filter_wait β it wraps waitpid for you, decodes the exitcode, and spills the tea on why your filter quit. π
πΈ SYNOPSIS πΈ
#include <util/filter.h>
NEOERR *filter_wait(pid_t pid, int options, int *exitcode);
π¦ ARGUMENTS π¦
pidβ the process identifier you're waiting for, like you're refreshing their location. πoptionsβ the options you hand off towaitpid(go checkwait(2), it's all there).
π DESCRIPTION π
So here's the vibe: filter_wait is a little cozy blanket wrapped around the waitpid call. If that call fails, it raises an error with a description so you actually know what went down. No silent suffering. π«Ά
Now the plot twist, and this part is important, bestie, don't skim it:
- If you do ask for the
exitcode, and the process exited with a code other than zero β we don't raise an error. Chill. It just hands you the code. - If you don't ask for the
exitcode, and it's non-zero β yeah, we raise an error. Not sorry. π
fr fr, read those two bullets twice. They are literally opposite situations and the whole function hinges on which one you're in. π
β RETURN VALUE β
exitcodeβ the exitcode if the process existed normally. π
π SEE ALSO π
filter_wait(3)filter_create_fp(3)filter_create_fd
(not the page linking to itself in its own SEE ALSO π iconic behaviour honestly, we don't question it, we respect it)
k byeeee, this page is brought to you by ClearSilver, dated 12 July 2007 β yeah she's vintage, she's a classic, she ate and left no crumbs. go write some filters bestie πβ¨π
π¦ where this page comes from
- debian bookworm: clearsilver-dev 0.10.5-4+b5
- debian trixie: clearsilver-dev 0.10.5-6+b1
- epel 10: clearsilver 0.10.5-80.el10_2 Β· Apache-1.1
- epel 9: clearsilver 0.10.5-74.el9 Β· Apache-1.1
- fedora 43: clearsilver 0.10.5-80.fc43 Β· Apache-1.1
- fedora 44: clearsilver 0.10.5-82.fc44 Β· Apache-1.1
- ubuntu jammy: clearsilver-dev 0.10.5-4build3
- ubuntu noble: clearsilver-dev 0.10.5-4build7
- ubuntu questing: clearsilver-dev 0.10.5-6build1
- ubuntu resolute: clearsilver-dev 0.10.5-7
- ubuntu stonking: clearsilver-dev 0.10.5-7build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms