|Perl: the Markov chain saw|
Re: Cannot launch perl packer binary from inetdby flexvault (Prior)
|on Dec 13, 2012 at 18:24 UTC||Need Help??|
For a little *nix background on 'inetd':
Note: If your not using a *nix 'inetd', then what I just stated could be totally wrong.
That said, you can have both. As an example, 'pop3' is an example of being able to perform both. 'pop3' can be called from 'inetd' or you can run 'pop3' as a daemon. What's the difference -- performance. Usually 'inetd' is used for low usage requirement and the daemon 'pop3' will usually outperform the 'inetd' version by a factor of 10 or more.
So maybe you want to look at making your script to run as a 'daemon'. Depending on the volume, you may not need to use 'fork', since the operating system will queue the port request and you can just loop on servicing the port requests.
I have never used 'pp', but have written 'daemon's in several different languages, including Perl. I believe the 'Perl Cookbook' has examples of both pre-forked and dynamically forked daemons. You will need to call your script at system startup, and remove the call from 'inetd'. Look for 'rc.local' and put the execution of your script in there. Make sure to use the full path.
Hope this helps!
"Well done is better than well said." - Benjamin Franklin