A detached thread must return, and I'm guessing on your platform, the socket isn't closing itself automatically. Maybe try something like this:
sub do_stuff { my $sock = shift; print "Client connected\n"; while( my $input = <$sock> ) { chomp( $input ); print "$input\n"; } print "Client disconnected\n"; $sock->close; #or close($sock); return; }
In reply to Re: Bus Error from threading IO::Socket
by zentara
in thread Bus Error from threading IO::Socket
by ewhitt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |