This fix should be applied to hammer branch. It can't be directly applied to master branch, because logrotate.conf is changed on matser since ceph-osd, ceph-mon, etc, is controlled by systemd with user/group as 'ceph' by default, while ceph-fuse might be started as root privilege by external users.
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
#include "common/Timer.h"
#include "common/ceph_argparse.h"
#include "global/global_init.h"
+#include "global/signal_handler.h"
#include "common/safe_io.h"
#ifndef DARWIN
goto out_client_unmount;
}
+ init_async_signal_handler();
+ register_async_signal_handler(SIGHUP, sighup_handler);
+
cerr << "ceph-fuse[" << getpid() << "]: starting fuse" << std::endl;
tester.init(cfuse, client);
tester.create();
free(newargv);
delete mc;
+
+ unregister_async_signal_handler(SIGHUP, sighup_handler);
+ shutdown_async_signal_handler();
//cout << "child done" << std::endl;
return r;
done
done
fi
+ killall -q -1 ceph-fuse || true
endscript
missingok
notifempty