
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.