diff options
author | Eric Wong <e@yhbt.net> | 2020-05-20 07:38:08 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-05-20 23:58:12 +0000 |
commit | 7eda704e4ec5b2ab897ef8da4fc90c48fcfc45a9 (patch) | |
tree | 4cb77b2e97bc7da2292b35c5166158a9bc253a5e | |
parent | 7bca96023bb26438a5c9d0a7eec3986f5d66f5bf (diff) | |
download | public-inbox-7eda704e4ec5b2ab897ef8da4fc90c48fcfc45a9.tar.gz |
Upon rereading the code, it wasn't immediately obvious to me why we didn't check for errors with `close($w)' instead of relying on `undef'. So add a comment for the benefit of future readers.
-rwxr-xr-x | script/public-inbox-convert | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script/public-inbox-convert b/script/public-inbox-convert index 7fb15adf..dbb2bd38 100755 --- a/script/public-inbox-convert +++ b/script/public-inbox-convert @@ -144,10 +144,10 @@ while (<$rd>) { last if $_ eq "done\n"; print $w $_ or $im->wfail; } -$w = $r = undef; close $rd or die "close fast-export: $!\n"; waitpid($pid, 0) or die "waitpid failed: $!\n"; $? == 0 or die "fast-export failed: $?\n"; +$r = $w = undef; # v2w->done does the actual close and error checking $v2w->done; if (my $mm = $old->mm) { $old->cleanup; |