* Removed the debugger() call when the input_server couldn't be started - it's not
a critical error, and definitely no reason to take the server and all GUI apps down. You could also still log in remotely. * Now opens and uses the syslog in some rare cases (should become the primary error channel over time). * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19646 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c42ca72638
commit
b5a8a89b5d
@ -21,6 +21,7 @@
|
||||
|
||||
#include <PortLink.h>
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
//#define DEBUG_SERVER
|
||||
#ifdef DEBUG_SERVER
|
||||
@ -49,6 +50,8 @@ AppServer::AppServer()
|
||||
fDesktops(),
|
||||
fDesktopLock("AppServerDesktopLock")
|
||||
{
|
||||
openlog("app_server", 0, LOG_DAEMON);
|
||||
|
||||
fMessagePort = create_port(DEFAULT_MONITOR_PORT_SIZE, SERVER_PORT_NAME);
|
||||
if (fMessagePort < B_OK)
|
||||
debugger("app_server could not create message port");
|
||||
@ -94,6 +97,8 @@ AppServer::~AppServer()
|
||||
|
||||
gFontManager->Lock();
|
||||
gFontManager->Quit();
|
||||
|
||||
closelog();
|
||||
}
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
* Axel Dörfler, axeld@pinc-software.de
|
||||
*/
|
||||
|
||||
/** Class used to encapsulate desktop management */
|
||||
/*! Class used to encapsulate desktop management */
|
||||
|
||||
|
||||
#include "Desktop.h"
|
||||
@ -40,6 +40,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#if TEST_MODE
|
||||
# include "EventStream.h"
|
||||
@ -400,12 +401,9 @@ void
|
||||
Desktop::_LaunchInputServer()
|
||||
{
|
||||
BRoster roster;
|
||||
status_t err = roster.Launch("application/x-vnd.Be-input_server");
|
||||
if (!(err == B_OK || err == B_ALREADY_RUNNING)) {
|
||||
char str[256];
|
||||
sprintf(str, "Failed to launch the input server (%s)!\n", strerror(err));
|
||||
debugger(str);
|
||||
}
|
||||
status_t status = roster.Launch("application/x-vnd.Be-input_server");
|
||||
if (status != B_OK && status != B_ALREADY_RUNNING)
|
||||
syslog(LOG_ERR, "Failed to launch the input server: %s!\n", strerror(status));
|
||||
}
|
||||
|
||||
|
||||
@ -578,10 +576,8 @@ Desktop::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
|
||||
}
|
||||
|
||||
case AS_EVENT_STREAM_CLOSED:
|
||||
{
|
||||
_LaunchInputServer();
|
||||
break;
|
||||
}
|
||||
|
||||
case B_QUIT_REQUESTED:
|
||||
// We've been asked to quit, so (for now) broadcast to all
|
||||
|
Loading…
Reference in New Issue
Block a user