traveler,
This doesn't really answer your question, but is more of a comment - you may want to use
system rather than
exec in your code.
Update: You may want to invest and purchase a copy of the Perl Cookbook. From pg. 621
Closing a Socket After Forking
- use
$socket->shutdown(0); There is more detail you may want to read up on as well.