X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyx_cb.C;h=ff6eeb49ac50f8c4bdfdf252ff3b0d18edee65dd;hb=2bb86211292f416cd584023feb23dc3b86bc1761;hp=add78e0693ef0b431e0b156781d89e56964a1fd9;hpb=b6e6f87f71b83a01607f11fe9201a114993ff559;p=lyx.git diff --git a/src/lyx_cb.C b/src/lyx_cb.C index add78e0693..ff6eeb49ac 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -44,6 +44,10 @@ #include "support/path.h" #include "support/systemcall.h" +#if !defined (HAVE_FORK) +# define fork() -1 +#endif + #include #include @@ -184,12 +188,12 @@ bool WriteAs(Buffer * buffer, string const & filename) } -void QuitLyX() +void QuitLyX(bool noask) { lyxerr[Debug::INFO] << "Running QuitLyX." << endl; if (lyx_gui::use_gui) { - if (!bufferlist.quitWriteAll()) + if (!noask && !bufferlist.quitWriteAll()) return; LyX::cref().lastfiles().writeFile(lyxrc.lastfiles);