From: <msc...@ao...> - 2003-08-04 05:00:08
|
Hey, just had an idea: How about if we add functionality to init_and_watch in Log::Log4perl to not only watch config files but to also be able to listen to (Unix) signals instead? Yeah, yeah, I know signals are unreliable and can cause all kinds of crazy stuff -- but how about if we have the signal handler just set a global variable, which is checked by the watcher code instead of calling time() all the time? Please take a look at the patch below, and let me know what you think ... the addtl. syntax is: init_and_watch($file, 'HUP'); # will listen to SIGHUP I've also attached a test file. -- Mike ############################ # Mike Schilli # # log...@pe... # # http://perlmeister.com # # log4perl.sourceforge.net # ############################ |