summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netfs/unittests/mockMount.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/netfs/unittests/mockMount.cpp b/netfs/unittests/mockMount.cpp
index adf1804..5c6a0b8 100644
--- a/netfs/unittests/mockMount.cpp
+++ b/netfs/unittests/mockMount.cpp
@@ -21,13 +21,19 @@ FuseMountPoint::FuseMountPoint() :
std::filesystem::remove_all(mntpnt);
std::filesystem::create_directory(mntpnt);
BOOST_REQUIRE_EQUAL(0, ::fuse_mount(fuseApp.fs, mntpnt.c_str()));
- th.emplace(::fuse_loop, fuseApp.fs);
+ th.emplace(
+ [](auto fs) {
+ ::fuse_set_signal_handlers(fuse_get_session(fs));
+ ::fuse_loop(fs);
+ },
+ fuseApp.fs);
BOOST_REQUIRE(th);
}
FuseMountPoint::~FuseMountPoint()
{
::fuse_exit(fuseApp.fs);
+ pthread_sigqueue(th->native_handle(), SIGINT, {});
th->join();
::fuse_unmount(fuseApp.fs);
std::filesystem::remove(mntpnt);