From 0f49c61e69229f54e76cf2acc51879801d90e10b Mon Sep 17 00:00:00 2001 From: helg Date: Thu, 14 Dec 2017 14:50:02 +0000 Subject: [PATCH] Add a missing call to fuse_set_signal_handlers(3) in fuse_setup(3) so that any file systems that call fuse_setup(3) or fuse_main(3) trap signals gracefully. ok mpi@ --- lib/libfuse/fuse.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libfuse/fuse.c b/lib/libfuse/fuse.c index 398b8a19103..7067a849358 100644 --- a/lib/libfuse/fuse.c +++ b/lib/libfuse/fuse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse.c,v 1.38 2017/12/14 13:11:37 helg Exp $ */ +/* $OpenBSD: fuse.c,v 1.39 2017/12/14 14:50:02 helg Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * @@ -556,6 +556,12 @@ fuse_setup(int argc, char **argv, const struct fuse_operations *ops, goto err; } + if (fuse_set_signal_handlers(fuse_get_session(fuse)) == -1) { + fuse_unmount(dir, fc); + fuse_destroy(fuse); + goto err; + } + if (mp != NULL) *mp = dir; -- 2.20.1