diff options
author | Steve Dickson <steved@redhat.com> | 2015-02-04 12:05:10 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2015-02-05 10:18:42 -0500 |
commit | 2f10c4aad6c24e642913e37dfb0c35e36b68b8d7 (patch) | |
tree | f9de95a87ab287e41639aeb79c7d8ef169fe9c34 /src | |
parent | bc2b14b27b7edad0c32e177067634ecc529bdcbb (diff) | |
download | rpcbind-2f10c4aad6c24e642913e37dfb0c35e36b68b8d7.tar.gz |
rpcbind: Separate the -d flag from the -f flag
To make it possible for debugging to happen in
background, separate the -d flag from the -f flag
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/rpcbind.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/rpcbind.c b/src/rpcbind.c index 2236d79..6d8bed2 100644 --- a/src/rpcbind.c +++ b/src/rpcbind.c @@ -230,18 +230,16 @@ main(int argc, char *argv[]) (void) signal(SIGUSR1, SIG_IGN); (void) signal(SIGUSR2, SIG_IGN); - if (debugging) { #ifdef RPCBIND_DEBUG - printf("rpcbind debugging enabled."); - if (doabort) { - printf(" Will abort on errors!\n"); - } else { - printf("\n"); - } + if (debugging) { + xlog(LOG_DEBUG, "debugging enabled."); + if (doabort) + xlog(LOG_DEBUG, "Will abort on errors!\n"); + } #endif - } else if (dofork) { + if (dofork) { if (daemon(0, 0)) - err(1, "fork failed"); + err(1, "fork failed"); } if (runasdaemon || rpcbinduser) { |