how can i write process_pool program?

i want to write a server process in the sco unix 505.The server process will fork multi-child-processes when it first starts.once parent process listen and accept any connect from client,it will transfer the connected sockfd to any free child process and child process will read client request from client.

how can i realize it?please help me!Thanks!

No idea, but you may want to look at some Apache code - that's what it does...
Download source code here:
http://httpd.apache.org

i donot know which codes i should refer to.please tell me ,thanks !

i think i should read the http_main.c,is it right!

Basically, you only have to fork() several childs whose "work" is to be blocked on accept().
As all childs are blocked there, when some connection arrives the kernel will awake one of the child processes, so it will go on after accept(), doing its "work".
Some operating systems dont allow blocking on accept(), so the childs are blocked in a file instead.( which, by the way, its more convenient.)