about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorlethalman <lucabru@src.gnome.org>2015-04-27 12:16:50 +0200
committerlethalman <lucabru@src.gnome.org>2015-04-27 12:16:50 +0200
commit458ea6d50610872d21300b2effeeae397bd385b5 (patch)
tree9d858fe48cd9b1d23deeebf1c005a0d9031e25f1 /pkgs
parentf134ba68e3206dcf03dddf0ad822c8c77ebdaa38 (diff)
parent7532c5379d02fb012fa42190424a46bdb033efcc (diff)
downloadnixlib-458ea6d50610872d21300b2effeeae397bd385b5.tar
nixlib-458ea6d50610872d21300b2effeeae397bd385b5.tar.gz
nixlib-458ea6d50610872d21300b2effeeae397bd385b5.tar.bz2
nixlib-458ea6d50610872d21300b2effeeae397bd385b5.tar.lz
nixlib-458ea6d50610872d21300b2effeeae397bd385b5.tar.xz
nixlib-458ea6d50610872d21300b2effeeae397bd385b5.tar.zst
nixlib-458ea6d50610872d21300b2effeeae397bd385b5.zip
Merge pull request #7480 from dezgeg/pr-ddclient-line-buffering
ddclient: Force line buffering on stdout
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/networking/ddclient/ddclient-line-buffer-stdout.patch20
-rw-r--r--pkgs/tools/networking/ddclient/default.nix2
2 files changed, 21 insertions, 1 deletions
diff --git a/pkgs/tools/networking/ddclient/ddclient-line-buffer-stdout.patch b/pkgs/tools/networking/ddclient/ddclient-line-buffer-stdout.patch
new file mode 100644
index 000000000000..d1ef9e024d2a
--- /dev/null
+++ b/pkgs/tools/networking/ddclient/ddclient-line-buffer-stdout.patch
@@ -0,0 +1,20 @@
+diff -u ddclient-3.8.1/ddclient ddclient-3.8.1.patched/ddclient
+--- ddclient-3.8.1/ddclient	2011-07-11 23:04:21.000000000 +0200
++++ ddclient-3.8.1.patched/ddclient	2012-11-08 11:52:31.930647236 +0100
+@@ -19,6 +19,7 @@ use strict;
+ use Getopt::Long;
+ use Sys::Hostname;
+ use IO::Socket;
++use IO::Handle qw( );
+ 
+ my ($VERSION) = q$Revision: 157 $ =~ /(\d+)/;
+ 
+@@ -675,7 +676,7 @@ $SIG{'TERM'}   = sub { $caught_term = 1; };
+ $SIG{'KILL'}   = sub { $caught_kill = 1; };
+ # don't fork() if foreground or force is on
+ if (opt('foreground') || opt('force')) {
+-    ;
++    STDOUT->autoflush(1);
+ } elsif (opt('daemon')) {
+     $SIG{'CHLD'}   = 'IGNORE';
+     my $pid = fork;
diff --git a/pkgs/tools/networking/ddclient/default.nix b/pkgs/tools/networking/ddclient/default.nix
index fdc5e145c4db..41688d843513 100644
--- a/pkgs/tools/networking/ddclient/default.nix
+++ b/pkgs/tools/networking/ddclient/default.nix
@@ -10,7 +10,7 @@ buildPerlPackage {
 
   buildInputs = [ perlPackages.IOSocketSSL perlPackages.DigestSHA1 ];
 
-  patches = [ ./ddclient-foreground.patch ];
+  patches = [ ./ddclient-foreground.patch ./ddclient-line-buffer-stdout.patch ];
 
   # Use iproute2 instead of ifconfig
   preConfigure = ''