Skip to content

fghack.8

Manvendra Bhangui edited this page Feb 25, 2024 · 4 revisions

NAME

fghack - is an anti-backgrounding tool.

SYNOPSIS

fghack child

DESCRIPTION

fghack runs child with many extra descriptors writing to a pipe. fghack reads and discards any data written to the pipe. After child has exited and the pipe has been closed, fghack exits.

Beware that supervise(8) cannot send signals to daemons under fghack. fghack creates a pipe from the daemon and reads data until the pipe is closed. Normally all the daemon's descendants will inherit the open pipe from the daemon, so the pipe will not be closed until they all exit.

However, fghack will exit early if the daemon goes out of its way to close extra descriptors. A few of these daemons leave descriptor 0 open, even though they do not use descriptor 0; so

#!/bin/sh
exec fghack baddaemon <&-

might work.

Instead of using fghack to handle daemons that puts themselves in background, you can set the sticky bit for the run file for the service. See supervise(8).

SEE ALSO

supervise(8), svc(8), svok(8), svstat(8), svscanboot(8), svscan(8), readproctitle(8), pgrphack(8), multilog(8), tai64n(8), tai64nlocal(8), setuidgid(8), envuidgid(8), envdir(8), softlimit(8), setlock(8),

Clone this wiki locally