From: jjenning@... (jared l. jennings) Date: 2002-05-07T04:00:19+09:00 Subject: fork + socket = hang i've got a program (interesting, but description lengthy) which accepts commands over socket connections. Here's a typical little transcript: nc localhost 1542 [recv] PLD G2 awaits your command. [recv] . [recv] [send] genre: misc [send] start_ices [recv] Started /usr/bin/ices -c /etc/ices/misc.ices.conf [recv] . [recv] [connection hangs] With other commands that don't involve forking and execing, i can send "close" and the server will close the connection. But with commands involving forking/execing (it was system before, but i copied stuff from this last thread about defunct processes), the connection hangs. I have to just ^C out of netcat and wait for the connection to time out on the other end. I surmise this hanging is because the child process gets all the open files (and sockets) in the fork{}, and closes them when it ends (because ices promptly forks off and exits). how do i keep this from happening?