Quiet gcc warnings on glibc systems that use warn_unused_result for

write(2).
This commit is contained in:
Todd C. Miller
2010-09-11 09:26:09 -04:00
parent bd1884bb43
commit c04f48b4bf

View File

@@ -468,7 +468,8 @@ handler(int s)
* The pipe is non-blocking, if we overflow the kernel's pipe
* buffer we drop the signal. This is not a problem in practice.
*/
(void)write(signal_pipe[1], &signo, sizeof(signo));
if (write(signal_pipe[1], &signo, sizeof(signo)) == -1)
/* shut up glibc */;
}
/*