-# Copyright (C) 2014-2018 all contributors <meta@public-inbox.org>
+# Copyright (C) 2014-2019 all contributors <meta@public-inbox.org>
# License: GPLv2 or later <https://www.gnu.org/licenses/gpl-2.0.txt>
#
# Used to read files from a git repository without excessive forking.
my $p = delete $self->{$pid} or return;
delete @$self{($in, $out)};
delete $self->{$err} if $err; # `err_c'
- waitpid $p, 0;
+
+ # PublicInbox::DS may not be loaded
+ eval { PublicInbox::DS::dwaitpid($p, undef, undef) };
+ waitpid($p, 0) if $@; # wait synchronously if not in event loop
}
sub fail {
chomp $oid;
my $buf = cat_file($self, $oid) or next;
$$buf =~ /^committer .*?> ([0-9]+) [\+\-]?[0-9]+/sm or next;
- my $cmt_time = $1;
+ my $cmt_time = $1 + 0;
$modified = $cmt_time if $cmt_time > $modified;
}
$modified || time;