FUSE_SETUP(3)

NAME
fuse_setup - FUSE helper function

SYNOPSIS
#include <fuse.h>
struct fuse *
fuse_setup(int argc, char **argv, const struct fuse_operations *ops, size_t size, char **mp, int *mt, void *data);

DESCRIPTION
fuse_setup() is a helper function that mounts a FUSE file system, creates a new FUSE session and installs signal handlers that will try to unmount the file system on SIGINT, SIGTERM or SIGHUP.

fuse_setup() will parse the arguments specified by argv and if neither the -f, -d or -odebug options were specified, detach from the controlling terminal and run in the background. On success, mt will be 1 if the file system operations will be invoked in parallel (multi-threaded) or 0 if file system operations are serialized. File systems that do not support multi-threaded operation must include the -s argument in argv. OpenBSD does not currently support multi-threaded operation.

The file system will be mounted on mp, which is the directory specified by the first argument that does not match one of the options recognised by fuse_parse_cmd_line(3).

fuse_operations is a struct of size size that contains pointers to FUSE file system operations. See fuse_new(3).

RETURN VALUES
fuse_setup() will return NULL on failure.

SEE ALSO
fuse_main(3), fuse_mount(3), fuse_new(3), fuse_parse_cmd_line(3), fuse_set_signal_handlers(3), fuse_teardown(3), fuse(4)

STANDARDS
The fuse_setup() function conforms to FUSE 2.6.

HISTORY
The fuse_setup() function first appeared in OpenBSD 5.4.

AUTHORS
Sylvestre Gallon <ccna.syl@gmail.com> Helg Bredow <helg@openbsd.org>