From 0419f7afbc644db80b0859c806bde68e7555ef21 Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Tue, 5 Jul 2005 15:31:28 +0000 Subject: [PATCH] also set output non-blocking git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@431 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/dnspcap.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pdns/dnspcap.cc b/pdns/dnspcap.cc index 11962e2b9..28a189e4a 100644 --- a/pdns/dnspcap.cc +++ b/pdns/dnspcap.cc @@ -89,6 +89,10 @@ PcapPacketWriter::PcapPacketWriter(const string& fname, PcapPacketReader& ppr) : if(!d_fp) unixDie("Unable to open file"); + + int flags=fcntl(fileno(d_fp),F_GETFL,0); + fcntl(fileno(d_fp), F_SETFL,flags&(~O_NONBLOCK)); // bsd needs this in stdin (??) + fwrite(&ppr.d_pfh, 1, sizeof(ppr.d_pfh), d_fp); } -- 2.50.0