diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-11-21 17:47:53 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-11-21 17:47:53 +0000 |
commit | ffb27000431f744f2cec9d198d0a0d8cbb0bd405 (patch) | |
tree | 818d52f0e8791741d643b1024c09c3f6e2c01b9b /IkiWiki/Plugin | |
parent | ee8e5261203bfb5964e7b14ef0137ad4c7b5137c (diff) |
* Add a test suite for the mercurial backend, contributed by Emanuele Aina.
* Add a test suite for the svn backend.
* Daemonize before sending RPC pings, since that can take a while
and/or hang.
* Daemonize before sending commit mails, as that can also take a long
time/hang if the mail server is unhappy.
* Factor out commit mail sending code into new function.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index c6c6c6a1e..e65b8ae71 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -342,7 +342,15 @@ sub pingurl (@) { #{{{ return; } - # TODO: daemonize here so slow pings don't slow down wiki updates + # daemonize here so slow pings don't slow down wiki updates + eval q{use POSIX ’setsid’}; + chdir '/'; + open STDIN, '/dev/null'; + open STDOUT, '>/dev/null'; + defined(my $pid = fork) or error("Can't fork: $!"); + return if $pid; + setsid() or error("Can't start a new session: $!"); + open STDERR, '>&STDOUT' or error("Can’t dup stdout: $!"); foreach my $page (keys %toping) { my $title=pagetitle(basename($page)); |