From: Chuck Lever Date: Mon, 27 Sep 2010 14:09:49 +0000 (-0400) Subject: mountd: Unregister mountd if my_svc_run() returns X-Git-Tag: nfs-utils-1-2-3~9 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=2c15cf2963367dee7106964c38ab7b1e30ba347d;p=nfs-utils.git 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 --- 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); }