From: Art Cancro Date: Sun, 2 May 2021 20:43:41 +0000 (-0400) Subject: Add backtrace to the appimage X-Git-Tag: v939~61 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=2bcc04fb3970e08d95704cd67ca6c3d30d9c9ea0 Add backtrace to the appimage --- diff --git a/appimage/ctdlvisor.c b/appimage/ctdlvisor.c index 6784f2cc5..c7a073a70 100644 --- a/appimage/ctdlvisor.c +++ b/appimage/ctdlvisor.c @@ -96,12 +96,14 @@ void detach_from_tty(void) { pid_t start_citadel() { char bin[1024]; + char backtrace_filename[PATH_MAX]; sprintf(bin, "%s/usr/local/citadel/citserver", getenv("APPDIR")); pid_t pid = fork(); if (pid == 0) { fprintf(stderr, "ctdlvisor: executing %s with data directory %s\n", bin, getenv("CTDL_DIR")); detach_from_tty(); - execlp(bin, "citserver", "-x9", "-h", getenv("CTDL_DIR"), NULL); + sprintf(backtrace_filename, "/tmp/citserver-backtrace.%d", getpid()); + execlp(bin, "citserver", "-x9", "-h", getenv("CTDL_DIR"), "-b", backtrace_filename, NULL); exit(errno); } else {