From: Ivan Havlicek <[email protected]>

When I use ldirector with fork enabled in /etc/ldirectord.conf:
fork=yes

the function check_dns needs to ignore the SIGCHILD otherwise
ldirectord try to spawn a new child infinitely.

Signed-off-by: Simon Horman <[email protected]>
---
 ldirectord/ldirectord.in |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ldirectord/ldirectord.in b/ldirectord/ldirectord.in
index 5e92d5f..af55fda 100644
--- a/ldirectord/ldirectord.in
+++ b/ldirectord/ldirectord.in
@@ -3563,6 +3563,8 @@ sub check_dns
                # which throw a fatal exception if they fail
                # Needless to say, this is completely stupid.
                local $SIG{'__DIE__'} = "DEFAULT";
+               # When fork=yes we need to ignore the child death
+               local $SIG{'CHLD'} = "IGNORE";
                require Net::DNS;
        }
        $res = new Net::DNS::Resolver;
-- 
1.7.4.1

_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to