syslog_daemon: don't delete the port on quit.

* It belongs to the launch daemon.
This commit is contained in:
Axel Dörfler
2015-07-22 20:40:56 +02:00
parent 798ad3db30
commit 7ef0edec04
+8 -4
View File
@@ -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)