From: Mark Wooding Date: Tue, 14 Nov 2017 18:06:20 +0000 (+0000) Subject: mason/pastebin/%show: Don't flush FS buffers in `filter' child. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/odin-cgi/commitdiff_plain/3badae73c1e4ed7cfb05ca0a5d7b4f06882f80e3 mason/pastebin/%show: Don't flush FS buffers in `filter' child. --- diff --git a/mason/pastebin/%show b/mason/pastebin/%show index d8573b5..3a8edb3 100644 --- a/mason/pastebin/%show +++ b/mason/pastebin/%show @@ -82,6 +82,7 @@ %# <%once> use utf8; + use POSIX qw(_exit); sub filter ($$$@) { my ($what, $m, $content, @cmd) = @_; @@ -90,7 +91,7 @@ open my $hl, "|-", @cmd or die "open $what: $!"; syswrite $hl, $content // die "$what write: $!"; close $hl or die "$what kid: $!, $?"; - exit 0; + _exit 0; } else { while (sysread $fh, my $buf, 8192) { $m->print($buf); } close $fh and waitpid $kid, 0