FUSE_DAEMONIZE(3) FreeBSD Library Functions Manual FUSE_DAEMONIZE(3)
NAME
fuse_daemonize - run in the background
SYNOPSIS
#include <fuse.h>
int
fuse_daemonize(int foreground);
DESCRIPTION
If foreground is 0, fuse_daemonize() will detach from the controlling
terminal and run in the background as a system daemon. Otherwise, the
process will continue to run in the foreground.
The current working directory is changed to the root (/) and standard
input; standard output and standard error are redirected to /dev/null.
RETURN VALUES
Upon success, fuse_daemonize() returns 0; otherwise -1 is returned.
ERRORS
fuse_daemonize() can fail for the same reasons as daemon(3).
SEE ALSO
daemon(3), fuse_parse_cmdline(3)
STANDARDS
The fuse_daemonize() function conforms to FUSE 2.6.
HISTORY
The fuse_daemonize() function first appeared in OpenBSD 5.4.
AUTHORS
Sylvestre Gallon <
[email protected]>
FreeBSD 14.1-RELEASE-p8 March 9, 2025 FreeBSD 14.1-RELEASE-p8