From bc2b14b27b7edad0c32e177067634ecc529bdcbb Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Wed, 4 Feb 2015 11:27:34 -0500 Subject: rpcbind: Enable the logging depending on flags. Enable the logging depending on background or foreground Signed-off-by: Steve Dickson --- src/rpcbind.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/rpcbind.c b/src/rpcbind.c index 66a01b3..2236d79 100644 --- a/src/rpcbind.c +++ b/src/rpcbind.c @@ -78,6 +78,7 @@ static inline void __nss_configure_lookup(const char *db, const char *s) {} #endif #include "rpcbind.h" +#include "xlog.h" /*#define RPCBIND_DEBUG*/ @@ -191,9 +192,16 @@ main(int argc, char *argv[]) exit(1); } xlog_open("rpcbind"); - xlog_syslog(TRUE); - xlog_syslog(TRUE); - + if (dofork) { + xlog_syslog(TRUE); + xlog_stderr(FALSE); + } else { + xlog_syslog(FALSE); + xlog_stderr(TRUE); + } + if (debugging) + xlog_config(D_ALL, 1); + rpc_control(RPC_SVC_CONNMAXREC_SET, &maxrec); init_transport(nconf); -- cgit v1.2.1