chiark / gitweb /
mason/pastebin/%show: Don't flush FS buffers in `filter' child. master
authorMark Wooding <mdw@distorted.org.uk>
Tue, 14 Nov 2017 18:06:20 +0000 (18:06 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 14 Nov 2017 18:06:20 +0000 (18:06 +0000)
mason/pastebin/%show

index d8573b5..3a8edb3 100644 (file)
@@ -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