I'm writing a daemon on solaris 5.7 with perl 5.005 that processes log files in real time. I thought I'd use a tail -f so I could read the logs while they where being generated. I used an alarm to unblock the read and look around once in a while to see if i should finish reading.
The problem is when its time to stop I can't close the file. The close gets blocked because the pipe on the other side isn't finished. Unfortunatly for me it never will so I need some way to cutting it off more forcebly. Does anyone have any ideas on how I can get this thing closed? Maby I need a better way of reading the file instead. Help would be very much appreciated.