[PATCH 3/7] mountd: Unregister mountd if my_svc_run() returns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

 utils/mountd/mountd.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

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);
 }
 

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux