1.\" $OpenBSD: fuse_set_signal_handlers.3,v 1.2 2018/07/05 14:55:05 jmc Exp $ 2.\" 3.\" Copyright (c) 2018 Helg Bredow <helg@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd $Mdocdate: July 5 2018 $ 18.Dt FUSE_SET_SIGNAL_HANDLERS 3 19.Os 20.Sh NAME 21.Nm fuse_set_signal_handlers , 22.Nm fuse_remove_signal_handlers 23.Nd install and remove FUSE signal handlers 24.Sh SYNOPSIS 25.In fuse.h 26.Ft int 27.Fn fuse_set_signal_handlers "struct fuse_session *se" 28.Ft void 29.Fn fuse_remove_signal_handlers "struct fuse_session *se" 30.Sh DESCRIPTION 31.Fn fuse_set_signal_handlers 32installs signal handlers for the signals SIGHUP, SIGINT and SIGTERM that 33will attempt to unmount the file system. 34SIGPIPE will be ignored. 35If there is already a signal handler installed for any of these signals 36then it is not replaced. 37.Pp 38.Fn fuse_remove_signal_handlers 39will restore the default signal handlers for any signals that were 40installed by 41.Fn fuse_set_signal_handlers . 42.Sh RETURN VALUES 43.Fn fuse_set_signal_handlers 44will return 0 on success and -1 on failure. 45.Sh SEE ALSO 46.Xr sigaction 2 , 47.Xr fuse_setup 3 48.Sh STANDARDS 49The 50.Fn fuse_set_signal_handlers 51and 52.Fn fuse_remove_signal_handlers 53functions conform to FUSE 2.6. 54.Sh HISTORY 55The 56.Fn fuse_set_signal_handlers 57and 58.Fn fuse_remove_signal_handlers 59functions first appeared in 60.Ox 5.4 . 61.Sh AUTHORS 62.An Helg Bredow Aq Mt helg@openbsd.org 63