diff options
author | David Hardeman <david@hardeman.nu> | 2015-01-21 16:16:59 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2015-01-23 14:19:09 -0500 |
commit | 7addf9dadb35e8f6a770b943e67ddc77e1bc97ba (patch) | |
tree | 80f3d61941272f055676823bc3a14fe8009525c2 /utils/gssd/gssd.c | |
parent | f980298853d9b12a222421342418732f65883c30 (diff) | |
download | nfs-utils-7addf9dadb35e8f6a770b943e67ddc77e1bc97ba.tar.gz nfs-utils-7addf9dadb35e8f6a770b943e67ddc77e1bc97ba.tar.xz nfs-utils-7addf9dadb35e8f6a770b943e67ddc77e1bc97ba.zip |
cleanup daemonization code
The daemonization init/ready functions have parameters that are never used,
require the caller to keep track of some pipefds that it has no interest in
and which might not be used in some scenarios. Cleanup both functions a bit.
The idea here is also that these two functions might be good points to
insert more systemd init code later (sd_notify()).
Also, statd had a private copy of the daemonization code for unknown
reasons...so make it use the generic version instead.
Signed-off-by: David H?rdeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/gssd/gssd.c')
-rw-r--r-- | utils/gssd/gssd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c index 6b8b863..dc84b3e 100644 --- a/utils/gssd/gssd.c +++ b/utils/gssd/gssd.c @@ -66,7 +66,6 @@ int root_uses_machine_creds = 1; unsigned int context_timeout = 0; unsigned int rpc_timeout = 5; char *preferred_realm = NULL; -int pipefds[2] = { -1, -1 }; void sig_die(int signal) @@ -206,8 +205,7 @@ main(int argc, char *argv[]) if (gssd_check_mechs() != 0) errx(1, "Problem with gssapi library"); - if (!fg) - mydaemon(0, 0, pipefds); + daemon_init(fg); signal(SIGINT, sig_die); signal(SIGTERM, sig_die); |