summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2024-05-03 11:42:27 +0200
committerSimon Rettberg2024-05-13 18:26:42 +0200
commit0fac2ed649a4ee7d419c944989d9c8b8e0550081 (patch)
tree89ae7a34234718e3b67e8922fe1676e964134e8a /src
parent[FUSE] Fix printf length (diff)
downloaddnbd3-0fac2ed649a4ee7d419c944989d9c8b8e0550081.tar.gz
dnbd3-0fac2ed649a4ee7d419c944989d9c8b8e0550081.tar.xz
dnbd3-0fac2ed649a4ee7d419c944989d9c8b8e0550081.zip
[FUSE] Don't exit on SIGQUIT, just stop uploading
Diffstat (limited to 'src')
-rw-r--r--src/fuse/cowfile.c1
-rw-r--r--src/fuse/main.c9
-rw-r--r--src/fuse/main.h1
3 files changed, 1 insertions, 10 deletions
diff --git a/src/fuse/cowfile.c b/src/fuse/cowfile.c
index dfa414e..ed370c2 100644
--- a/src/fuse/cowfile.c
+++ b/src/fuse/cowfile.c
@@ -810,7 +810,6 @@ void quitSigHandler( int sig UNUSED )
{
uploadCancelled = true;
uploadLoop = false;
- main_shutdown();
}
/**
diff --git a/src/fuse/main.c b/src/fuse/main.c
index b665aed..3269d15 100644
--- a/src/fuse/main.c
+++ b/src/fuse/main.c
@@ -546,6 +546,7 @@ int main( int argc, char *argv[] )
struct sigaction newHandler = { .sa_handler = &noopSigHandler };
sigemptyset( &newHandler.sa_mask );
sigaction( SIGHUP, &newHandler, NULL );
+ sigaction( SIGQUIT, &newHandler, NULL );
} while ( 0 );
if ( useCow ) {
sigset_t sigmask;
@@ -641,11 +642,3 @@ int main( int argc, char *argv[] )
logadd( LOG_DEBUG1, "Terminating. FUSE REPLIED: %d\n", fuse_err );
return fuse_err;
}
-
-void main_shutdown(void)
-{
- fuse_session_exit( _fuseSession );
- // TODO: Figure out why this doesn't wake up the fuse mainloop.
- // For now, just send SIGQUIT followed by SIGTERM....
- kill( 0, SIGINT );
-}
diff --git a/src/fuse/main.h b/src/fuse/main.h
index 53d81e4..bf21805 100644
--- a/src/fuse/main.h
+++ b/src/fuse/main.h
@@ -8,6 +8,5 @@
extern bool useCow;
extern bool cow_merge_after_upload;
void image_ll_getattr( fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi );
-void main_shutdown(void);
#endif /* main_H_ */