#!/usr/bin/perl # # logfifo # tee for a fifo with nonblocking write # use Fcntl; use strict; $| = 1; my $fifo = shift; die "no fifo specified" if (not defined $fifo); my $fifo_open = sysopen(F,$fifo,O_NONBLOCK|O_RDWR); while ( ) { syswrite(F,$_,length($_)) if ( $fifo_open ); print $_; }