about summary refs log tree commit diff
path: root/src/misc
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-04-13 17:51:45 -0400
committerRich Felker <dalias@aerifal.cx>2011-04-13 17:51:45 -0400
commita77411a50d22f6c9db305f19efda5ab2db3266de (patch)
tree9c11d764c72f0fbc2a251d7bee2193be2d137b7d /src/misc
parenta444ee34103bb06dbcf6ddfa10abd7712982b090 (diff)
downloadmusl-a77411a50d22f6c9db305f19efda5ab2db3266de.tar.gz
musl-a77411a50d22f6c9db305f19efda5ab2db3266de.tar.xz
musl-a77411a50d22f6c9db305f19efda5ab2db3266de.zip
remove useless SIGPIPE protection from syslog
per the standard, SIGPIPE is not generated for SOCK_DGRAM.
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/syslog.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/misc/syslog.c b/src/misc/syslog.c
index 6fc6f4d8..de42ce25 100644
--- a/src/misc/syslog.c
+++ b/src/misc/syslog.c
@@ -65,7 +65,6 @@ void openlog(const char *ident, int opt, int facility)
 
 void syslog(int priority, const char *message, ...)
 {
-	sigset_t set, oldset;
 	va_list ap;
 	char timebuf[16];
 	time_t now;
@@ -83,10 +82,6 @@ void syslog(int priority, const char *message, ...)
 		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);
@@ -105,9 +100,5 @@ void syslog(int priority, const char *message, ...)
 	// 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);
 }