* 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 <PortLink.h>
|
||||||
|
|
||||||
|
#include <syslog.h>
|
||||||
|
|
||||||
//#define DEBUG_SERVER
|
//#define DEBUG_SERVER
|
||||||
#ifdef DEBUG_SERVER
|
#ifdef DEBUG_SERVER
|
||||||
@ -49,6 +50,8 @@ AppServer::AppServer()
|
|||||||
fDesktops(),
|
fDesktops(),
|
||||||
fDesktopLock("AppServerDesktopLock")
|
fDesktopLock("AppServerDesktopLock")
|
||||||
{
|
{
|
||||||
|
openlog("app_server", 0, LOG_DAEMON);
|
||||||
|
|
||||||
fMessagePort = create_port(DEFAULT_MONITOR_PORT_SIZE, SERVER_PORT_NAME);
|
fMessagePort = create_port(DEFAULT_MONITOR_PORT_SIZE, SERVER_PORT_NAME);
|
||||||
if (fMessagePort < B_OK)
|
if (fMessagePort < B_OK)
|
||||||
debugger("app_server could not create message port");
|
debugger("app_server could not create message port");
|
||||||
@ -94,6 +97,8 @@ AppServer::~AppServer()
|
|||||||
|
|
||||||
gFontManager->Lock();
|
gFontManager->Lock();
|
||||||
gFontManager->Quit();
|
gFontManager->Quit();
|
||||||
|
|
||||||
|
closelog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* Axel Dörfler, axeld@pinc-software.de
|
* Axel Dörfler, axeld@pinc-software.de
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** Class used to encapsulate desktop management */
|
/*! Class used to encapsulate desktop management */
|
||||||
|
|
||||||
|
|
||||||
#include "Desktop.h"
|
#include "Desktop.h"
|
||||||
@ -40,6 +40,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <syslog.h>
|
||||||
|
|
||||||
#if TEST_MODE
|
#if TEST_MODE
|
||||||
# include "EventStream.h"
|
# include "EventStream.h"
|
||||||
@ -400,12 +401,9 @@ void
|
|||||||
Desktop::_LaunchInputServer()
|
Desktop::_LaunchInputServer()
|
||||||
{
|
{
|
||||||
BRoster roster;
|
BRoster roster;
|
||||||
status_t err = roster.Launch("application/x-vnd.Be-input_server");
|
status_t status = roster.Launch("application/x-vnd.Be-input_server");
|
||||||
if (!(err == B_OK || err == B_ALREADY_RUNNING)) {
|
if (status != B_OK && status != B_ALREADY_RUNNING)
|
||||||
char str[256];
|
syslog(LOG_ERR, "Failed to launch the input server: %s!\n", strerror(status));
|
||||||
sprintf(str, "Failed to launch the input server (%s)!\n", strerror(err));
|
|
||||||
debugger(str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -578,10 +576,8 @@ Desktop::_DispatchMessage(int32 code, BPrivate::LinkReceiver &link)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case AS_EVENT_STREAM_CLOSED:
|
case AS_EVENT_STREAM_CLOSED:
|
||||||
{
|
|
||||||
_LaunchInputServer();
|
_LaunchInputServer();
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case B_QUIT_REQUESTED:
|
case B_QUIT_REQUESTED:
|
||||||
// We've been asked to quit, so (for now) broadcast to all
|
// We've been asked to quit, so (for now) broadcast to all
|
||||||
|
Loading…
Reference in New Issue
Block a user