fix syslog (corrected SIGPIPE blocking, and using dgram instead of stream)
[musl] / src / termios / tcdrain.c
index c51dd40..9ff1ecd 100644 (file)
@@ -1,7 +1,13 @@
 #include <termios.h>
 #include <sys/ioctl.h>
+#include "libc.h"
 
 int tcdrain(int fd)
 {
-       return ioctl(fd, TCSBRK, 1);
+       int ret;
+       CANCELPT_BEGIN;
+       ret = ioctl(fd, TCSBRK, 1);
+       CANCELPT_TRY;
+       CANCELPT_END;
+       return ret;
 }