* Catch failing IPC::Open2 in tidy plugin and retry in case this is a
transient failure to fork (which I've seen happen in the wild).master
parent
24fcf2b97d
commit
480a49af47
|
@ -17,7 +17,18 @@ sub import { #{{{
|
|||
} # }}}
|
||||
|
||||
sub sanitize ($) { #{{{
|
||||
open2(*IN, *OUT, 'tidy -quiet -asxhtml -utf8 --show-body-only yes --show-warnings no --tidy-mark no') or return shift;
|
||||
my $tries=10;
|
||||
while (1) {
|
||||
eval {
|
||||
open2(*IN, *OUT, 'tidy -quiet -asxhtml -utf8 --show-body-only yes --show-warnings no --tidy-mark no');
|
||||
};
|
||||
last unless $@;
|
||||
$tries--;
|
||||
if ($tries < 1) {
|
||||
IkiWiki::debug("failed to run tidy: $@");
|
||||
return shift;
|
||||
}
|
||||
}
|
||||
# open2 doesn't respect "use open ':utf8'"
|
||||
binmode (IN, ':utf8');
|
||||
binmode (OUT, ':utf8');
|
||||
|
|
|
@ -4,8 +4,10 @@ ikiwiki (1.20) UNRELEASED; urgency=low
|
|||
Since these can easily become part of other people's websites, they
|
||||
should be under as permissive a license as possible.
|
||||
* Add --syslog config option, to log to the syslog.
|
||||
* Catch failing IPC::Open2 in tidy plugin and retry in case this is a
|
||||
transient failure to fork (which I've seen happen in the wild).
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 16 Aug 2006 17:07:35 -0400
|
||||
-- Joey Hess <joeyh@debian.org> Thu, 17 Aug 2006 14:43:02 -0400
|
||||
|
||||
ikiwiki (1.19) unstable; urgency=low
|
||||
|
||||
|
|
Loading…
Reference in New Issue