]> granicus.if.org Git - pdns/commitdiff
also set output non-blocking
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 5 Jul 2005 15:31:28 +0000 (15:31 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 5 Jul 2005 15:31:28 +0000 (15:31 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@431 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dnspcap.cc

index 11962e2b9ebc09113f07bdbee5c1aa2c9030716b..28a189e4a03720c19f97f02906d1ca4d9f214dde 100644 (file)
@@ -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);
   
 }