diff --git a/adsbus/send.c b/adsbus/send.c index 52e009c..871c7cc 100644 --- a/adsbus/send.c +++ b/adsbus/send.c @@ -1,11 +1,11 @@ #include #include -#include #include #include #include #include #include +#include #include #include "airspy_adsb.h" @@ -88,14 +88,13 @@ static bool send_hello(int fd, struct serializer *serializer) { if (buf.length == 0) { return true; } - if (write(fd, buf_at(&buf, 0), buf.length) != buf.length) { + if (send(fd, buf_at(&buf, 0), buf.length, MSG_NOSIGNAL) != buf.length) { return false; } return true; } void send_init() { - signal(SIGPIPE, SIG_IGN); } void send_cleanup() {