ravydavygravy wrote: » Just close the file handle when you are finished with it:http://us3.php.net/manual/en/function.pclose.php
Jonathan wrote: » Could you echo ps at the end of your script and parse the output? Kill any processes based on their pid that way?
Cantab. wrote: » Thought about doing something like that...
Cantab. wrote: » But there are multiple clients accessing this php file at once. How do I know what PID to kill?
Jonathan wrote: » Never mentioned that... :P I *think* unix PID's are sequential. Kill the lowest value PID?
my $pid = open(FH, "tail -f $filename" ) or warn "$!\n";
Cantab. wrote: » I'm thinking of re-writing the whole thing in perl.
Jonathan wrote: » What does the whole thing do any way?
ravydavygravy wrote: » I don't get it - you want to kill loads of tail processes from the command line? kill -9 `ps ax | grep 'tail -f'` or killall tail