signal(SIGSEGV, SIG_DFL);
signal(SIGTERM, SIG_DFL);
- bufferlist.emergencyWriteAll();
+ LyX::emergencyCleanup();
lyxerr << "Bye." << endl;
if (err_sig!= SIGHUP &&
system_lyxdir = LYX_DIR;
path_shown = true;
}
-
// Report the system directory if debugging is on
if (!path_shown)
lyxerr[Debug::INIT] << "System directory: '"
}
+void LyX::emergencyCleanup()
+{
+ // what to do about tmpfiles is non-obvious. we would
+ // like to delete any we find, but our lyxdir might
+ // contain documents etc. which might be helpful on
+ // a crash
+
+ bufferlist.emergencyWriteAll();
+ if (lyxserver)
+ lyxserver->emergencyCleanup();
+}
+
+
// LyX can optionally take over the handling of deadkeys
void LyX::deadKeyBindings(kb_keymap * kbmap)
{