![]() |
|
more useful options | |
PerlMonks |
Im I forking properly ?by leostereo (Beadle) |
on Apr 14, 2016 at 20:37 UTC ( [id://1160466]=perlquestion: print w/replies, xml ) | Need Help?? |
leostereo has asked for the wisdom of the Perl Monks concerning the following question: This is the first time I need to do fork , so Im reading and trying to learn how to do it. Im reading and processing the log lines of my dhcp sever wich are coming really fast. For each line I receive I need to perform a snmpget querie to the ips Im grabing. The problem is that each querie takes more than a second to return a value so it is delaying all the script so I had to do fork. I have this first version working but I would like have your opinion in order to improve it or make it run in a more secure way.
I must admint this is a mix of multiple scripts I founded on the web. I hope to hear your opinion in case is there is something I should be aware or change. I promess to read and learn about forking , wait , and related topics. So far , it is not creating more than 8 process and no zombies also so Im very happy. Regards, Leandro.
Back to
Seekers of Perl Wisdom
|
|