void syslog(int priority, const char *message, ...)
{
- sigset_t set, oldset;
va_list ap;
char timebuf[16];
time_t now;
return;
}
- sigemptyset(&set);
- sigaddset(&set, SIGPIPE);
- pthread_sigmask(SIG_BLOCK, &set, &oldset);
-
now = time(NULL);
gmtime_r(&now, &tm);
strftime(timebuf, sizeof timebuf, "%b %e %T", &tm);
// Note: LOG_CONS is not supported because it is annoying!!
// syslogd will send messages to console if it deems them appropriate!
- /* Clear any possible SIGPIPE generated by the socket write. */
- sigtimedwait(&set, 0, (struct timespec [1]){0}) || (perror("x"),1);
- pthread_sigmask(SIG_SETMASK, &oldset, 0);
-
UNLOCK(&lock);
}