Function daemon

Source
pub(crate) fn daemon()
Expand description

stdout, stderr をリダイレクトし、デーモン化する。

ファイルオープンに失敗したら exit(1) する。 デーモン化に失敗したら exit(1) する。 成功した場合は元の親プロセスは正常終了し、子プロセスが以降の処理を続行する。