S6-FGHACK(8)

NAME
s6-fghack - an anti-backgrounding tool

SYNOPSIS
s6-fghack prog...

DESCRIPTION
s6-fghack opens a lot of file descriptors (all writing to a single pipe).

Then it spawns prog... as a child.

If something gets written on one of those descriptors, it's a bug in prog. s6-fghack then complains and exits 102.

Unless prog... goes out of its way to close descriptors it does not know about, s6-fghack is able to detect when prog... exits. It exits with an approximation ( cf. execline(1)) of the same exit code.

s6-fghack is what it says: a hack. Ideally, you should never have to use it. It is only useful when you want to supervise a daemon that does not provide a “stay in the foreground” option; and even then, the right thing is to report this as a bug to the daemon author and have it fixed.

SEE ALSO
s6-applyuidgid(8), s6-envdir(8), s6-envuidgid(8), s6-setsid(8), s6-setuidgid(8), s6-softlimit(8), s6-tai64n(8), s6-tai64nlocal(8)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/s6-fghack.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)