mountd: Unregister mountd if my_svc_run() returns
authorChuck Lever <chuck.lever@oracle.com>
Mon, 27 Sep 2010 14:09:49 +0000 (10:09 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 27 Sep 2010 15:28:10 +0000 (11:28 -0400)
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 <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mountd/mountd.c

index a4fdcc8..9c7caf9 100644 (file)
@@ -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);
 }