From 2c15cf2963367dee7106964c38ab7b1e30ba347d Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Mon, 27 Sep 2010 10:09:49 -0400 Subject: [PATCH] mountd: Unregister mountd if my_svc_run() returns Fix a long standing bug: when my_svc_run() returns, mountd should unregister itself with the local rpcbind so that it can subsequently start cleanly. Log a more helpful error message in this case. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- utils/mountd/mountd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index a4fdcc8..9c7caf9 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -888,7 +888,8 @@ main(int argc, char **argv) my_svc_run(); - xlog(L_ERROR, "Ack! Gack! svc_run returned!\n"); + xlog(L_ERROR, "RPC service loop terminated unexpectedly. Exiting...\n"); + unregister_services(); exit(1); } -- 2.39.5