LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-04-2003, 08:33 PM   #1
nenejung
LQ Newbie
 
Registered: Jul 2003
Location: Bangkok,Thailand.
Posts: 2

Rep: Reputation: 0
Angry why can not fork new childs?


Dear all,

Question about TCP/IP network programming

We have a server process open socket and wait for connection from clients processes.
In normal case, when server get connection request from client it will
fork new child process for service that client.
I mean that, if we have three client processes the server will fork three child processes too.

For our problems we founded :
Case 1
If some server child process deads (by terminate it self or was killed) we found that,
when client request for connect... the server not accept or fork child process for service this client, until
all child processes dead. Why server not receive connection from client ?

Case 2
We have server child processes more than one processes available and some dead,
if we start client for request connection , we found no response from server (server not accept or fork child process ) then
if client terminate by exit() command , server will show status receive connect from client
but it not work ... why server not immediate response when client request for connection.

Thank in advance for your answers.
 
Old 08-04-2003, 08:55 PM   #2
shellcode
Member
 
Registered: May 2003
Location: Beverly Hills
Distribution: Slackware, Gentoo
Posts: 350

Rep: Reputation: 32
Re: why can not fork new childs?

Quote:
Originally posted by nenejung
Dear all,

Question about TCP/IP network programming

We have a server process open socket and wait for connection from clients processes.
In normal case, when server get connection request from client it will
fork new child process for service that client.
I mean that, if we have three client processes the server will fork three child processes too.

For our problems we founded :
Case 1
If some server child process deads (by terminate it self or was killed) we found that,
when client request for connect... the server not accept or fork child process for service this client, until
all child processes dead. Why server not receive connection from client ?

Case 2
We have server child processes more than one processes available and some dead,
if we start client for request connection , we found no response from server (server not accept or fork child process ) then
if client terminate by exit() command , server will show status receive connect from client
but it not work ... why server not immediate response when client request for connection.

Thank in advance for your answers.

i had the same problems...use select() instead.
 
Old 08-05-2003, 12:58 PM   #3
sk8guitar
Member
 
Registered: Jul 2003
Location: DC
Distribution: mandrake 9.1
Posts: 415

Rep: Reputation: 30
cuase its against the law!











sorry, i couldn't resist
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fork beginner_84 Programming 2 08-20-2004 04:53 AM
Suidical Childs in Perl KneeLess Programming 6 06-13-2004 06:22 PM
over-fork luzi82 Linux - Newbie 2 01-02-2004 06:55 AM
Apache 2.0.47 childs segfault markus1982 Linux - Networking 3 10-20-2003 01:52 PM
why can not fork new childs? nenejung Programming 2 07-30-2003 05:13 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration