Just like we used to do for the logs, we must disable blocking on FD
output except if it's a terminal.
*/
#include <sys/uio.h>
+#include <fcntl.h>
+#include <unistd.h>
#include <common/compat.h>
#include <common/config.h>
#include <common/ist.h>
goto end;
}
+ /* FD not yet initialized to non-blocking mode.
+ * DON'T DO IT ON A TERMINAL!
+ */
+ if (!isatty(fd))
+ fcntl(fd, F_SETFL, O_NONBLOCK);
sink->type = SINK_TYPE_FD;
sink->ctx.fd = fd;
end: