mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
avoid closing server in emergency exit if there is no server
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3028 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
737cd9d8f3
commit
48fa20dfe9
@ -1,6 +1,15 @@
|
|||||||
2001-11-14 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
2001-11-14 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* lyxrc.C (read):
|
* lyxserver.C (emergencyCleanup): do not try to close pipes if
|
||||||
|
server is not running.
|
||||||
|
(openConnection):
|
||||||
|
(closeConnection): add debug info when server is disabled.
|
||||||
|
|
||||||
|
* ColorHandler.C (getGCForeground): send debug message to GUI
|
||||||
|
channel.
|
||||||
|
|
||||||
|
* lyxrc.C: do not include lyxserver.h and tex-strings.h.
|
||||||
|
|
||||||
* kbmap.C (bind): modify because return conventions of
|
* kbmap.C (bind): modify because return conventions of
|
||||||
kb_sequence::parse have changed.
|
kb_sequence::parse have changed.
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ GC LyXColorHandler::getGCForeground(LColor::color c)
|
|||||||
val.foreground = bla;
|
val.foreground = bla;
|
||||||
// Try the exact RGB values first, then the approximate.
|
// Try the exact RGB values first, then the approximate.
|
||||||
} else if (XAllocColor(display, colormap, &xcol) != 0) {
|
} else if (XAllocColor(display, colormap, &xcol) != 0) {
|
||||||
if (lyxerr.debugging()) {
|
if (lyxerr.debugging(Debug::GUI)) {
|
||||||
lyxerr << _("LyX: X11 color ") << s
|
lyxerr << _("LyX: X11 color ") << s
|
||||||
<< _(" allocated for ")
|
<< _(" allocated for ")
|
||||||
<< lcolor.getGUIName(c) << endl;
|
<< lcolor.getGUIName(c) << endl;
|
||||||
|
@ -23,10 +23,8 @@
|
|||||||
#include "lyxrc.h"
|
#include "lyxrc.h"
|
||||||
#include "kbmap.h"
|
#include "kbmap.h"
|
||||||
#include "LyXAction.h"
|
#include "LyXAction.h"
|
||||||
#include "lyxserver.h"
|
|
||||||
#include "lyx_main.h"
|
#include "lyx_main.h"
|
||||||
#include "intl.h"
|
#include "intl.h"
|
||||||
#include "tex-strings.h"
|
|
||||||
#include "support/path.h"
|
#include "support/path.h"
|
||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
#include "lyxtext.h"
|
#include "lyxtext.h"
|
||||||
|
@ -108,7 +108,12 @@ void LyXComm::openConnection()
|
|||||||
// We assume that we don't make it
|
// We assume that we don't make it
|
||||||
ready = false;
|
ready = false;
|
||||||
|
|
||||||
if (pipename.empty()) return;
|
if (pipename.empty()) {
|
||||||
|
lyxerr[Debug::LYXSERVER]
|
||||||
|
<< "LyXComm: server is disabled, nothing to do"
|
||||||
|
<< endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((infd = startPipe(inPipeName(), false)) == -1)
|
if ((infd = startPipe(inPipeName(), false)) == -1)
|
||||||
return;
|
return;
|
||||||
@ -136,6 +141,9 @@ void LyXComm::closeConnection()
|
|||||||
lyxerr[Debug::LYXSERVER] << "LyXComm: Closing connection" << endl;
|
lyxerr[Debug::LYXSERVER] << "LyXComm: Closing connection" << endl;
|
||||||
|
|
||||||
if (pipename.empty()) {
|
if (pipename.empty()) {
|
||||||
|
lyxerr[Debug::LYXSERVER]
|
||||||
|
<< "LyXComm: server is disabled, nothing to do"
|
||||||
|
<< endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,9 +263,11 @@ void LyXComm::endPipe(int & fd, string const & filename)
|
|||||||
|
|
||||||
void LyXComm::emergencyCleanup()
|
void LyXComm::emergencyCleanup()
|
||||||
{
|
{
|
||||||
|
if (!pipename.empty()) {
|
||||||
endPipe(infd, inPipeName());
|
endPipe(infd, inPipeName());
|
||||||
endPipe(outfd, outPipeName());
|
endPipe(outfd, outPipeName());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Receives messages and sends then to client
|
// Receives messages and sends then to client
|
||||||
|
Loading…
Reference in New Issue
Block a user