note
flexvault
<p>For a little *nix background on 'inetd':
<ul>
'inetd' is a daemon that waits on ports and then calls (fork) a program to process the requests. When the program completes, it goes away. It is not a daemon, 'inetd' is the daemon.
</p><p>Note: If your not using a *nix 'inetd', then what I just stated could be totally wrong.
</p>
</ul>
<p>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.
<p>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.
</p><p>
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.</p>
<p>Hope this helps!</p>
<p>Good Luck!</p>
<div class="pmsig"><div class="pmsig-733061">
<p><b>"Well done is better than well said." - Benjamin Franklin</b></p>
</div></div>
1008364
1008364