in reply to How Can I Reliably Cleanup Sockets in a Backgrounded Program?
You are probably having issues because you set $SIG{CHILD} when you meant to set $SIG{CHLD}.