- my @feeds=needsaggregate();
- return unless @feeds;
-
- # Fork a child process to handle the aggregation.
- # The parent process will then handle building the
- # result. This avoids messy code to clear state
- # accumulated while aggregating.
- defined(my $pid = fork) or error("Can't fork: $!");
- if (! $pid) {
- IkiWiki::loadindex();
- aggregate(@feeds);
- expire();
- savestate();
- exit 0;
- }
- waitpid($pid,0);
- if ($?) {
- error "aggregation failed with code $?";
- }
- $IkiWiki::forcerebuild{$_->{sourcepage}}=1
- foreach @feeds;
-