]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
don't block SIGCHLD, or we lose return values from system() !
authorAndrew Tridgell <tridge@samba.org>
Tue, 29 May 2007 07:23:29 +0000 (17:23 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 29 May 2007 07:23:29 +0000 (17:23 +1000)
nicer log messages from events script

(This used to be ctdb commit 5ed2b496675a6a47d7ad87519a97bc4f293e6730)

ctdb/common/ctdb_daemon.c
ctdb/tools/events

index 7e871a15cc0255b6ec190ce5214dc0f1c602ca9b..3248775519f4a937572c76b19a18d133d42e0c14 100644 (file)
@@ -734,7 +734,6 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork)
                setsid();
        }
        block_signal(SIGPIPE);
-       block_signal(SIGCHLD);
 
        /* try to set us up as realtime */
        ctdb_set_realtime();
index 166b61ceaf39fbb84f584327c6f8415d0491b0cc..2536e59c395add3d3426a8cd5d445d4a0a141072 100755 (executable)
@@ -13,8 +13,11 @@ case $cmd in
        iface=$1
        ip=$2
        maskbits=$3
-       exec /sbin/ip addr add $ip/$maskbits dev $iface
-       exit 1
+       /sbin/ip addr add $ip/$maskbits dev $iface || {
+                echo "Failed to add $ip/$maskbits on dev $iface"
+                exit 1
+       }
+       exit 0
        ;;
 
      releaseip)
@@ -25,8 +28,11 @@ case $cmd in
        iface=$1
        ip=$2
        maskbits=$3
-       exec /sbin/ip addr del $ip dev $iface
-       exit 1
+       /sbin/ip addr del $ip dev $iface || {
+                echo "Failed to del $ip on dev $iface"
+                exit 1
+       }
+       exit 0
        ;;
 
      recovered)