child process.
} #}}}
sub pingurl (@) { #{{{
- return unless $config{pingurl} && %toping;
+ return unless @{$config{pingurl}} && %toping;
eval q{require RPC::XML::Client};
if ($@) {
}
# 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;
+ 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.
);
# Daemonize, in case the mail sending takes a while.
+ defined(my $pid = fork) or error("Can't fork: $!");
+ return if $pid;
+ setsid() or error("Can't start a new session: $!");
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: $!");
unlockwiki(); # don't need to keep a lock on the wiki
+ikiwiki (1.34.3) UNRELEASED; urgency=low
+
+ * Fix daemonisation code to only do daemon setup things after forking the
+ child process.
+
+ -- Joey Hess <joeyh@debian.org> Fri, 1 Dec 2006 19:11:32 -0500
+
ikiwiki (1.34.2) unstable; urgency=low
* Allow /etc/ikiwiki/wikilist to list just the names of users, if so then