diff options
Diffstat (limited to 'dns/ddclient/files/patch-ddclient')
-rw-r--r-- | dns/ddclient/files/patch-ddclient | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/dns/ddclient/files/patch-ddclient b/dns/ddclient/files/patch-ddclient new file mode 100644 index 000000000000..5a1c51e7aa7b --- /dev/null +++ b/dns/ddclient/files/patch-ddclient @@ -0,0 +1,61 @@ +--- ./ddclient.orig 2009-01-27 20:14:02.000000000 +0100 ++++ ./ddclient 2010-08-17 20:13:00.000000000 +0200 +@@ -1,4 +1,3 @@ +-#!/usr/bin/perl -w + #!/usr/local/bin/perl -w + ###################################################################### + # $Id: ddclient 106 2008-12-04 18:05:23Z wimpunk $ +@@ -19,6 +18,7 @@ + use Getopt::Long; + use Sys::Hostname; + use IO::Socket; ++use POSIX 'setsid'; + + my $version = "3.8.0"; + my $programd = $0; +@@ -625,6 +625,9 @@ + $SIG{'KILL'} = sub { $caught_kill = 1; }; + if (opt('daemon') && !opt('force')) { + $SIG{'CHLD'} = 'IGNORE'; ++ chdir '/'; ++ open(STDIN, "</dev/null"); ++ open(STDOUT, ">/dev/null"); + my $pid = fork; + if ($pid < 0) { + print STDERR "${program}: can not fork ($!)\n"; +@@ -632,11 +635,10 @@ + } elsif ($pid) { + exit 0; + } ++ setsid; + $SIG{'CHLD'} = 'DEFAULT'; + $opt{'syslog'} = 1; +- open(STDOUT, ">/dev/null"); +- open(STDERR, ">/dev/null"); +- open(STDIN, "</dev/null"); ++ open(STDERR, "&STDOUT"); + + write_pid(); + } +@@ -1404,17 +1406,17 @@ + ## execute the command. + local *FD; + if (! open(FD, $cmd)) { +- printf STDERR "$program: cannot execute command %s.\n", $cmd; ++ warning("$program: cannot execute command %s.\n", $cmd); + + } elsif ($stdin && (! print FD "$stdin\n")) { +- printf STDERR "$program: failed writting to %s.\n", $cmd; ++ warning("$program: failed writing to %s.\n", $cmd); + close(FD); + + } elsif (! close(FD)) { +- printf STDERR "$program: failed closing %s.($@)\n", $cmd; ++ warning("$program: failed closing %s.($@)\n", $cmd); + + } elsif (opt('exec') && $?) { +- printf STDERR "$program: failed %s. ($@)\n", $cmd; ++ warning("$program: failed %s. ($@)\n", $cmd); + + } else { + $ok = 1; |