in reply to Checking for NPH client connection
$SIG{PIPE} = sub { exit; } [download]
$SIG{PIPE} = \&cleanup; [download]