mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-09 12:28:13 -04:00
Install fatal signal handlers in mkdwarfs
and dwarfs
This commit is contained in:
parent
a0a97eeb1b
commit
f3b40e6400
@ -28,6 +28,7 @@
|
||||
#include <filesystem>
|
||||
|
||||
#include <folly/Conv.h>
|
||||
#include <folly/experimental/symbolizer/SignalHandler.h>
|
||||
|
||||
#include <fuse3/fuse_lowlevel.h>
|
||||
|
||||
@ -449,6 +450,10 @@ int run_fuse(struct fuse_args& args) {
|
||||
usage(s_opts.progname);
|
||||
}
|
||||
|
||||
if (fuse_opts.foreground) {
|
||||
folly::symbolizer::installFatalSignalHandler();
|
||||
}
|
||||
|
||||
struct fuse_lowlevel_ops fsops;
|
||||
|
||||
::memset(&fsops, 0, sizeof(fsops));
|
||||
|
@ -45,6 +45,7 @@
|
||||
|
||||
#include <folly/Conv.h>
|
||||
#include <folly/FileUtil.h>
|
||||
#include <folly/experimental/symbolizer/SignalHandler.h>
|
||||
#include <folly/gen/String.h>
|
||||
|
||||
#include <fmt/format.h>
|
||||
@ -624,6 +625,7 @@ int mkdwarfs(int argc, char** argv) {
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
try {
|
||||
folly::symbolizer::installFatalSignalHandler();
|
||||
return mkdwarfs(argc, argv);
|
||||
} catch (std::exception const& e) {
|
||||
std::cerr << "ERROR: " << folly::exceptionStr(e) << std::endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user