FUSE_DAEMONIZE(3) | Library Functions Manual | FUSE_DAEMONIZE(3)

# NAME

`fuse_daemonize` — run in the background

# SYNOPSIS

library “libfuse”
`#include <fuse.h>`

int
`fuse_daemonize`(int foreground);

# DESCRIPTION

If foreground is 0, `fuse_daemonize`() detaches from the controlling terminal and runs in the background as a system daemon. Otherwise, the process continues to run in the foreground.

The current working directory is changed to the root directory (/). 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 <ccna.syl@gmail.com>

September 23, 2025 | Debian