diff options
author | Eric Wong <e@80x24.org> | 2016-02-25 04:37:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-02-25 04:37:25 +0000 |
commit | 0258ba3cd2d32ee46f95e9fc8d0adeb857459d64 (patch) | |
tree | 37eb2ffc10f15ae169acf63e2441ae48f1a093ec | |
parent | 2d6c35391565a261d2e86868c9b69219a58ea6a2 (diff) | |
download | public-inbox-0258ba3cd2d32ee46f95e9fc8d0adeb857459d64.tar.gz |
Even with output buffering disabled via IO::Handle::autoflush, writes are not atomic unless it is a single argument passed to "print". Multiple arguments to "print" will show up as multiple calls to write(2) instead of a single, atomic writev(2).
-rw-r--r-- | lib/PublicInbox/GitHTTPBackend.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index 9c32535b..58799707 100644 --- a/lib/PublicInbox/GitHTTPBackend.pm +++ b/lib/PublicInbox/GitHTTPBackend.pm @@ -139,7 +139,7 @@ sub serve_smart { while (1) { my $r = $input->read($buf, 8192); unless (defined $r) { - $err->print('error reading input: ', $!, "\n"); + $err->print("error reading input: $!\n"); return r(500); } last if ($r == 0); @@ -150,12 +150,12 @@ sub serve_smart { } my ($rpipe, $wpipe); unless (pipe($rpipe, $wpipe)) { - $err->print('error creating pipe', $!, "\n"); + $err->print("error creating pipe: $!\n"); return r(500); } my $pid = fork; # TODO: vfork under Linux... unless (defined $pid) { - $err->print('error forking: ', $!, "\n"); + $err->print("error forking: $!\n"); return r(500); } my $git_dir = $git->{git_dir}; |