cluster_fatal() exit code should not indicate success.
authorMartin Schwenke <martin@meltin.net>
Thu, 22 Oct 2009 11:03:20 +0000 (13:03 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 2 Nov 2010 14:59:05 +0000 (15:59 +0100)
cluster_fatal() logs a fatal event and then exits with 0.  This seems
wrong.  Sometimes command like "net" use this code and return
incorrect empty output but then exit with 0.

This simply changes the exit code to 1.

Signed-off-by: Martin Schwenke <martin@meltin.net>
source3/lib/ctdbd_conn.c

index f8d6245d8a1a4c3fa2c54b5da851ce8c93a9a49a..4a521ca3905c4384423aeec876b5e8967ff0a57b 100644 (file)
@@ -58,7 +58,7 @@ static void cluster_fatal(const char *why)
           a core file. We need to release this process id immediately
           so that someone else can take over without getting sharing
           violations */
-       _exit(0);
+       _exit(1);
 }
 
 /*