On 2/1/06, Jeff Pang <[EMAIL PROTECTED]> wrote:
> hello,
> You have misunderstood my meanings.
> I fork the child process in socket server's parent process,and the socket 
> server accept the requests from socket clients,which are distributed in about 
> 200 different hosts.
> I don't do the IPC communication of child-to-parent socket.:-)
>

Jeff,

You can also use sockets locally to communicate between parent and
child. The process connectiong to the socket doesn't have to be on a
remote host. Search the docs for the differnce between "unix" sockets
and TCP/UDP sockets; see also "named pipes".

You'll also want to be careful with all this forking. Accepting
multiple connections from hundreds of hosts can fill up the process
table and eat up file descriptors pretty quickly, especially if you're
creating zombies and not reaping them, not mention memory: each forked
child gets it's own complete copy of the Perl interpreter, plus
whatever modules the parent has loaded. Forking is expensive; this may
be a good time to read up oin threads.

-- jay
--------------------------------------------------
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.dpguru.com  http://www.engatiki.org

values of β will give rise to dom!

Reply via email to