Is there someone who could offer a solution for a fifo based log-roration script (Maybe in perl) or binary that can handle with Input and outputfile an create a pid file?
exampe.pl or example.binary [opt] [<infile>] <outfile>
opt: -1 one-line-buffered output -p <pidfile> save process id in <pidfile>
function: append input to <outfile>. On receiving SIGHUP <outfile> will be closed and reopened, thus enabling log-rotation of outfile.
note: if no <infile> is given, use STDIN.
Passing a named FIFO is not treated exactly in the same way as input redirection from a fifo or an unnamed pipe: A named fifo as argument will be reopened on EOF - a redirected input will not!