in reply to signal handler in referenced subroutine
Err... I see a potential design flaw here! Killing a process when a file reaches a certain size or uptime does not make much sense, unless you can justify it with some major requirement, or maybe I didn't understand well...
TMBAWTDI! (There MUST Be Another Way To Do It!). What about this metacode:
sub writer_function { if((time - $^T <= $max_uptime) && ($output_size <= $max_size)) { # # Normal processing here # $output_size += $size_written; } else { # # Cleanup, then exit # } }
Sounds good?
-- TMTOWTDI
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: signal handler in referenced subroutine
by aijin (Monk) on Aug 04, 2001 at 00:07 UTC |