summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMantas Mikulenas <grawity@gmail.com>2012-10-15 16:08:34 -0400
committerSteve Dickson <steved@redhat.com>2012-10-15 16:08:34 -0400
commit985f89a8a87f2626583b240f7abad86d97a77596 (patch)
treeae5558e91bf74bf25cd71e4be39c589e91513f09
parent329c63dd7e4e76fc66e8a6058d95c59974ad7db1 (diff)
downloadnfs-utils-985f89a8a87f2626583b240f7abad86d97a77596.zip
nfs-utils-985f89a8a87f2626583b240f7abad86d97a77596.tar.gz
nfs-utils-985f89a8a87f2626583b240f7abad86d97a77596.tar.xz
utils: Return status 0 on clean exits
Some init systems actually expect daemons to return 0 on success. Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--utils/gssd/gssd.c2
-rw-r--r--utils/gssd/svcgssd.c2
-rw-r--r--utils/mountd/mountd.c3
-rw-r--r--utils/statd/statd.c3
4 files changed, 6 insertions, 4 deletions
diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c
index 7825255..a3292c9 100644
--- a/utils/gssd/gssd.c
+++ b/utils/gssd/gssd.c
@@ -71,7 +71,7 @@ sig_die(int signal)
if (root_uses_machine_creds)
gssd_destroy_krb5_machine_creds();
printerr(1, "exiting on signal %d\n", signal);
- exit(1);
+ exit(0);
}
void
diff --git a/utils/gssd/svcgssd.c b/utils/gssd/svcgssd.c
index 1afff9e..8aee3b2 100644
--- a/utils/gssd/svcgssd.c
+++ b/utils/gssd/svcgssd.c
@@ -153,7 +153,7 @@ sig_die(int signal)
{
/* destroy krb5 machine creds */
printerr(1, "exiting on signal %d\n", signal);
- exit(1);
+ exit(0);
}
void
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index bcf5080..993b6e6 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -196,7 +196,8 @@ killer (int sig)
wait_for_workers();
}
cleanup_lockfiles();
- xlog (L_FATAL, "Caught signal %d, un-registering and exiting.", sig);
+ xlog (L_NOTICE, "Caught signal %d, un-registering and exiting.", sig);
+ exit(0);
}
static void
diff --git a/utils/statd/statd.c b/utils/statd/statd.c
index 01fdb41..652546c 100644
--- a/utils/statd/statd.c
+++ b/utils/statd/statd.c
@@ -99,7 +99,8 @@ static void
killer (int sig)
{
statd_unregister ();
- xlog_err ("Caught signal %d, un-registering and exiting", sig);
+ xlog(D_GENERAL, "Caught signal %d, un-registering and exiting", sig);
+ exit(0);
}
static void