diff options
author | Steve Dickson <steved@redhat.com> | 2015-02-04 11:27:34 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2015-02-05 10:18:42 -0500 |
commit | bc2b14b27b7edad0c32e177067634ecc529bdcbb (patch) | |
tree | b01d2e7dde62fa256d2b9b8a75d556fc65b672b6 | |
parent | a43b98ee247dbf4e38349a4ed5ace5a995f8934a (diff) | |
download | rpcbind-bc2b14b27b7edad0c32e177067634ecc529bdcbb.tar.gz |
rpcbind: Enable the logging depending on flags.
Enable the logging depending on background or foreground
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | src/rpcbind.c | 14 |
1 files 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); |