Sample Server leaves defuncts... 
Author Message
 Sample Server leaves defuncts...

I have used the Ch6 sample internet server as the basis for a program that
accepts connections and performs a dialog with the user.   Users connect to
the server via telnet, provide some information, and quit (via a command).

The server forked-child-loop now looks like so:

... (fork) ...
...
while (<NS>) {
  local($i) = $_;
  chop($i);
  if ($i =~ /^quit/i) {
    goto CLOSETHIS;
  }
  else {
    ... do other things ...
   }

  sub sub1 {
  }
  ...
  sub subn {
  }

Quote:
}

CLOSETHIS:
print NS "Goodbye!\n";
close(NS);
exit;

Everything works great.  Multiple users are able to log on to the server,
transact, and log off leaving the created information.  However, during a test
run, I noticed that the children where becoming defunct when the user quit.

Help, please!

--

System Manager                  Center for Network Neuroscience
University of North Texas       PO Box 5218 Denton, Texas 76203
817/565-3896,3472               Ignorance & Fear.  Fear & Ignorance.



Sat, 02 Apr 1994 08:23:20 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. MultiPOP: leave messages larger than X on the server

2. socket server leaves zombies?

3. Simple Sample Server Stumper

4. Sockets-based server daemon sample?

5. Wanted: Perl server, or samples.

6. /BAR[^LEFT]*LEFT/ doesn't work

7. REPOST: Waiting for the Sample Server?

8. sample code wanted to cope with news HISTORY file, NNTP server

9. Sample TCP-server not working ...

10. Sample Simple Server from Camel book

11. I need sample client/server program using Socket.pm

12. Request: Sample Multi Threaded Perl TCP Server/

 

 
Powered by phpBB® Forum Software