[uClinux-dev] Reboot not dropping network connections
stuartm at connecttech.com
Sun Mar 30 11:34:37 EST 2003
I have a custom app that listens on a port, and spawns a child to
handle the connection.
If I connect to its port with telnet, I can talk to the app. If I kill
the child handling the connection, the connection drops. If I kill the
parent, it kills the child and the connection drops.
However, if I use the reboot command (from sash), the machine reboots
but the connection does not drop. Ethereal shows that in the reboot
case the final FIN ACK packets are never sent.
I would like a rebooting machine to gracefully notify the remote that
the connection is over. I tried rearranging the order of the kill
commands in user/sash/reboot.c, no help. I tried explicitly closing
the socket when trapping SIGTERM, no help. I tried adding very long
delays to the sleep commands, no help. I don't understand why a
SIGTERM from reboot causes the FIN packet not to be sent. Anyone have
any insight? I'm hoping I've overlooked something obvious.
..Stu, new to the network progamming thing...
More information about the uClinux-dev