in reply to File::Tail issue..
If read returns with an error when interrupted by the signal, the loop exits so you never read from the new file.
If read doesn't return when interrupted by the signal, you don't use the new value of $file so you never read from the new file.
Ideally, the former occurs. Then you could do something like
use Errno qw( EINTR ); do { while (defined($line=$file->read)) { print $line; } } while $! != EINTR; # Go read from new file.
I don't have an obvious solution if the read doesn't return. Is this what happens?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File::Tail issue..
by tuxtoti (Initiate) on Mar 20, 2009 at 17:54 UTC | |
by ikegami (Patriarch) on Mar 20, 2009 at 18:03 UTC | |
by Anonymous Monk on Mar 20, 2009 at 21:08 UTC | |
by ikegami (Patriarch) on Mar 20, 2009 at 21:32 UTC |