|2588 local * write_child = sub ($) { |2589 my $out=$_[0]; |2590 return unless $iopair[1] and ref $iopair[1] and -w $iopair[1]; |2591 |2592 local * pipe_catch = sub ($) { Debug "Child closed"; |2593 $iopair[1] = $iopair[0] = undef; }; |2594 |2595 $SIG{PIPE}=\&pipe_catch; |2596 no warnings; |2597 open (OLDERR, ">&", \*STDERR) or die "Can't dup STDERR: $!"; |2598 open (STDERR, ">", "/dev/null") or die "Can't redirect STDERR to /dev/null: $!"; |2599 select STDERR; $|=1; |2600 P $iopair[1], $out."\n" ; |2601 open(STDERR, ">&OLDERR") or die "Can't restore stderr: $!"; |2602 $SIG{PIPE}='DEFAULT'; |2603 };