$SIG{PIPE} = sub { $log->warning("Caught SIGPIPE: $!"); $running = 1; }; #### $log->warning("In thread: Attempting to shutdown handle associated with fileno: $fno"); shutdown ($socket, 2) or $log->warning ("In thread: Shutdown error: $!"); $log->warning("In thread: Attempting to close handle associated with fileno: $fno"); close $socket or $log->warning ("In thread: close error: $!"); $log->warning("In thread: Enqueing in Qclean fileno: $fno"); $Qclean->enqueue( $fno ); #### $ perl -e 'printf "getmyip%c",0' | ./nc myhost.com 9999 #### x.x.x.x #### August 29 09:12:44 xmlsockd-advanced[32652]: (1) : XML IP request from: x.x.x.x August 29 09:12:44 xmlsockdx[32652]: In thread: Attempting to shutdown handle associated with fileno: 5 August 29 09:12:44 xmlsockdx[32652]: In thread: Attempting to close handle associated with fileno: 5 August 29 09:12:44 xmlsockdx[32652]: Caught SIGPIPE: Broken pipe August 29 09:12:44 xmlsockdx[32652]: In thread: close error: Broken pipe #### $log->warning("In thread: Attempting to shutdown handle associated with fileno: $fno"); shutdown ($socket, 2) or $log->warning ("In thread: shutdown error: $!"); $log->warning("In thread: Enqueing in Qclean fileno: $fno"); $Qclean->enqueue( $fno ); #### while ( $Qclean->pending ) { my $fileno = $Qclean->dequeue(); delete $sockets{ $fileno }; } #### $ perl -e 'printf "%c",0' | ./nc myhost.com 9999 #### #### August 29 09:26:31 xmlsockd[7815]: (1) : XML IP request from: x.x.x.x August 29 09:26:31 xmlsockd[7815]: In thread: Attempting to shutdown handle associated with fileno: 5 August 29 09:26:31 xmlsockd[7815]: In thread: Enqueing in Qclean fileno: 5 August 29 09:26:31 xmlsockd[7815]: Caught SIGPIPE: Broken pipe