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 /support/include | |
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 'support/include')
-rw-r--r-- | support/include/nfslib.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/support/include/nfslib.h b/support/include/nfslib.h index c5dc6f8..c9a13cb 100644 --- a/support/include/nfslib.h +++ b/support/include/nfslib.h @@ -17,6 +17,7 @@ #include <sys/socket.h> #include <netinet/in.h> #include <stdio.h> +#include <stdbool.h> #include <paths.h> #include <rpcsvc/nfs_prot.h> #include <nfs/nfs.h> @@ -129,8 +130,8 @@ void fendrmtabent(FILE *fp); void frewindrmtabent(FILE *fp); /* mydaemon */ -void mydaemon(int nochdir, int noclose, int *pipefds); -void release_parent(int *pipefds); +void daemon_init(bool fg); +void daemon_ready(void); /* * wildmat borrowed from INN |