in reply to POE::Wheel questions
Normally, most programs that allow reload of configurations have a SIGHUP signal handler (or SIGUSR1) which causes the reload. The reason for this is simple: you don't want to reload an incomplete file - if the sysadmin is in the middle of saving when you notice the file changed, you could interrupt the save process, read half a file, and get something that didn't make sense. Or maybe the sysadmin was saving progress as they went because they were worried about losing changes - e.g., working via dial-up, and worried that their connection would drop at any minute now that their teenaged daughter just got home from school and would mindlessly pick up the phone to call her friends who she just left not more then 20 minutes ago at school, but had to call them right now! In that case, you don't want to pick up the changes until the user explicitly told you to. And the popular way, as I said, is to run "kill 1 `cat /var/pid/yourprogram.pid`". Or something to similar effect. (1 is SIGHUP on most systems.)
Efficient means you need to keep the filehandle open - opening for append on each line can get expensive for large files. More efficient may be to log to a database and let the database handle the conflicts.
Final question: yes - you could telnet in via Net::Telnet and do whatever you want with the incoming data.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: POE::Wheel questions
by shockers (Acolyte) on Oct 03, 2005 at 18:41 UTC | |
by Tanktalus (Canon) on Oct 03, 2005 at 23:15 UTC | |
by shockers (Acolyte) on Oct 04, 2005 at 07:22 UTC |