OlegG has asked for the wisdom of the Perl Monks concerning the following question:
As you know sigpipe may occur when you are writing to closed socket. I know two ways to prevent it:
install signal handler
use send instead syswrite with MSG_NOSIGNAL parameter
But I can't find any of this in LWP code. For example here is writing to socket: https://metacpan.org/source/GAAS/libwww-perl-6.04/lib/LWP/Protocol/http.pm#L231
Other http client module HTTP::Tiny has such check: https://metacpan.org/source/DAGOLDEN/HTTP-Tiny-0.024/lib/HTTP/Tiny.pm#L487
Other http client module HTTP::Tiny has such check: https://metacpan.org/source/DAGOLDEN/HTTP-Tiny-0.024/lib/HTTP/Tiny.pm#L487
Back to
Seekers of Perl Wisdom