From 4ef79c9802d923bf90c259881d2dcae8deda66a2 Mon Sep 17 00:00:00 2001
From: Niels de Vos <niels@nixpanic.net>
Date: Tue, 9 Nov 2010 10:09:02 +0000
Subject: [PATCH 1/1] Force running in single-threaded mode
This should prevent any crashes related to multithreading.
Signed-off-by: Niels de Vos <niels@nixpanic.net>
---
archivemount.1.in | 3 +++
archivemount.c | 5 +++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/archivemount.1.in b/archivemount.1.in
index dca05d2..611bc56 100644
--- a/archivemount.1.in
+++ b/archivemount.1.in
@@ -419,6 +419,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
This is beta software and should be treated as such. Bug reports to the
AUTHORS listed below would be appreciated.
+archivemount is forced to run a single-thread mode for now. Support for
+stable multithreading is planned in a future release.
+
.SH SEE ALSO
diff --git a/archivemount.c b/archivemount.c
index dde9b5c..1970f09 100644
--- a/archivemount.c
+++ b/archivemount.c
@@ -2329,6 +2329,11 @@ main( int argc, char **argv )
/* Initialize the node tree lock */
pthread_rwlock_init(&lock, NULL);
+ /* always use fuse in single-threaded mode
+ * multithreading is broken with libarchive :-(
+ */
+ fuse_opt_add_arg( &args, "-s" );
+
/* now do the real mount */
fuse_ret = fuse_main( args.argc, args.argv, &ar_oper, NULL );
--
1.7.3.4