This is completely bogus, as the daemon will not be able to bind again after a restart. --- ./sysklogd/syslogd.c.klogd4 2006-03-13 17:11:41.000000000 +0100 +++ ./sysklogd/syslogd.c 2006-03-13 17:16:50.000000000 +0100 @@ -504,7 +504,10 @@ static void quit_signal(int sig) { logMessage(LOG_SYSLOG | LOG_INFO, "System log daemon exiting."); - unlink(lfile); + /* WARNING ! Never remove the socket otherwise some services will + * hang trying to talk to us even after a restart ! + * // unlink(lfile); + */ #ifdef CONFIG_FEATURE_IPC_SYSLOG ipcsyslog_cleanup(); #endif @@ -589,7 +592,10 @@ /* Create the syslog file so realpath() can work. */ if (realpath(_PATH_LOG, lfile) != NULL) { - unlink(lfile); + struct stat st; + /* unlink only if the entry is not a socket */ + if (stat(lfile, &st) == 0 && !S_ISSOCK(st.st_mode)) + unlink(lfile); } memset(&sunx, 0, sizeof(sunx));