X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e7ddbb822ac6251bc2204b86495d86f631937d1f..a9fb41084613bbc4c53faeb33ee90a6eb6c52533:/IkiWiki/Plugin/inline.pm diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index eb9708a8c..8c00ca5f5 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -234,12 +234,14 @@ sub date_3339 ($) { #{{{ sub absolute_urls ($$) { #{{{ # sucky sub because rss sucks my $content=shift; - my $url=shift; + my $baseurl=shift; + my $url=$baseurl; $url=~s/[^\/]+$//; - $content=~s//dev/null'; defined(my $pid = fork) or error("Can't fork: $!"); return if $pid; + chdir '/'; + eval q{use POSIX ’setsid’}; setsid() or error("Can't start a new session: $!"); + open STDIN, '/dev/null'; + open STDOUT, '>/dev/null'; open STDERR, '>&STDOUT' or error("Can’t dup stdout: $!"); # Don't need to keep a lock on the wiki as a daemon.