syslog_daemon: don't delete the port on quit.
* It belongs to the launch daemon.
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
#define B_TRANSLATION_CONTEXT "SyslogDaemon"
|
||||
|
||||
|
||||
static const int32 kQuitDaemon = 'quit';
|
||||
|
||||
|
||||
SyslogDaemon::SyslogDaemon()
|
||||
:
|
||||
BApplication(B_SYSTEM_LOGGER_SIGNATURE),
|
||||
@@ -89,10 +92,8 @@ SyslogDaemon::AboutRequested()
|
||||
bool
|
||||
SyslogDaemon::QuitRequested()
|
||||
{
|
||||
delete_port(fPort);
|
||||
|
||||
int32 returnCode;
|
||||
wait_for_thread(fDaemon, &returnCode);
|
||||
write_port(fPort, kQuitDaemon, NULL, 0);
|
||||
wait_for_thread(fDaemon, NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -144,6 +145,9 @@ SyslogDaemon::_Daemon()
|
||||
break;
|
||||
}
|
||||
|
||||
if (code == kQuitDaemon)
|
||||
return;
|
||||
|
||||
// if we don't get what we want, ignore it
|
||||
if (bytesRead < (ssize_t)sizeof(syslog_message)
|
||||
|| code != SYSLOG_MESSAGE)
|
||||
|
||||
Reference in New Issue
Block a user