Index: flowd.py
===================================================================
RCS file: /var/cvs/flowd/flowd.py,v
retrieving revision 1.10
diff -u -p -r1.10 flowd.py
--- flowd.py	14 May 2005 07:22:08 -0000	1.10
+++ flowd.py	16 May 2005 13:34:28 -0000
@@ -54,7 +54,17 @@ class log:
 		self.mode = mode
 		if mode == "r":
 			self.flow_file = open(path, "rb")
-			# Read header
+			mode = os.fstat(self.flow_file.fileno())[0]
+
+			# Skip reading header on FIFO
+			if (mode & 0170000) == 0010000:
+				self.magic = 0x012cf047
+				self.version = 0x00000002
+				self.start_time = 0
+				self.flags = 0
+				return
+
+			# Read header on regular files
 			hdr = self.flow_file.read(16)
 			if len(hdr) != 16:
 				raise ValueError, "Short read on flow header"
Index: Flowd-perl/lib/Flowd.pm
===================================================================
RCS file: /var/cvs/flowd/Flowd-perl/lib/Flowd.pm,v
retrieving revision 1.2
diff -u -p -r1.2 Flowd.pm
--- Flowd-perl/lib/Flowd.pm	14 May 2005 07:22:08 -0000	1.2
+++ Flowd-perl/lib/Flowd.pm	16 May 2005 13:34:28 -0000
@@ -138,10 +138,21 @@ sub init {
 	my $fhandle;
 	my $hdr;
 	my $r;
+	my @st;
 
 	$self->{filename} = $filename;
 	open($fhandle, "<$filename") or die "open($filename): $!";
 	$self->{handle} = $fhandle;
+
+	@st = stat($self->{handle})
+	if (($st[2] & 0170000) == 0010000) {
+		# If reading from FIFO, assume that version matches
+		$self->{version} = 0x00000002;
+		$self->{magic} = 0x012cf047;
+		$self->{start_time} = 0;
+		$self->{flags} = 0;
+		return;
+	}
 
 	# Read initial header
 	$r = read($self->{handle}, $hdr, 16);
