summaryrefslogtreecommitdiffstats
path: root/utils/gssd/gssd.c
diff options
context:
space:
mode:
authorScott Mayhew <smayhew@redhat.com>2015-11-02 08:07:11 -0500
committerSteve Dickson <steved@redhat.com>2015-11-02 08:55:04 -0500
commit273b46473594b8aa4e55f682577d1dd94d44ad50 (patch)
treec83e47605065049015bacfe091b45caac3b959e7 /utils/gssd/gssd.c
parent7f62e37fcd25f09949a547b93c35d9e324211102 (diff)
downloadnfs-utils-273b46473594b8aa4e55f682577d1dd94d44ad50.tar.gz
nfs-utils-273b46473594b8aa4e55f682577d1dd94d44ad50.tar.xz
nfs-utils-273b46473594b8aa4e55f682577d1dd94d44ad50.zip
close the syslog fd in daemon_init()
Commit 7addf9d (cleanup daemonization code) added the following line to mydaemon_init(): dup2(pipefds[1], 3); If we've already called vsyslog() before the fork(), then chances are fd 3 was being used for the syslog socket. In that case the next vsyslog() call will cause the data to appear on the read end of the pipe, causing the parent to exit with a nonzero status. If systemd is running, it will see the parent's nonzero exit status and will terminate the child as well. So just call closelog() to close the fd. The next call to vsyslog() will open a new one if need be. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/gssd/gssd.c')
0 files changed, 0 insertions, 0 deletions