.\" $OpenBSD: fuse_set_signal_handlers.3,v 1.2 2018/07/05 14:55:05 jmc Exp $ .\" .\" Copyright (c) 2018 Helg Bredow .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd $Mdocdate: July 5 2018 $ .Dt FUSE_SET_SIGNAL_HANDLERS 3 .Os .Sh NAME .Nm fuse_set_signal_handlers , .Nm fuse_remove_signal_handlers .Nd install and remove FUSE signal handlers .Sh SYNOPSIS .In fuse.h .Ft int .Fn fuse_set_signal_handlers "struct fuse_session *se" .Ft void .Fn fuse_remove_signal_handlers "struct fuse_session *se" .Sh DESCRIPTION .Fn fuse_set_signal_handlers installs signal handlers for the signals SIGHUP, SIGINT and SIGTERM that will attempt to unmount the file system. SIGPIPE will be ignored. If there is already a signal handler installed for any of these signals then it is not replaced. .Pp .Fn fuse_remove_signal_handlers will restore the default signal handlers for any signals that were installed by .Fn fuse_set_signal_handlers . .Sh RETURN VALUES .Fn fuse_set_signal_handlers will return 0 on success and -1 on failure. .Sh SEE ALSO .Xr sigaction 2 , .Xr fuse_setup 3 .Sh STANDARDS The .Fn fuse_set_signal_handlers and .Fn fuse_remove_signal_handlers functions conform to FUSE 2.6. .Sh HISTORY The .Fn fuse_set_signal_handlers and .Fn fuse_remove_signal_handlers functions first appeared in .Ox 5.4 . .Sh AUTHORS .An Helg Bredow Aq Mt helg@openbsd.org