]> git.ipfire.org Git - thirdparty/lldpd.git/commit
daemon: annotate "daemonisation" to help Coverity
authorVincent Bernat <vincent@bernat.ch>
Sun, 21 Mar 2021 11:05:16 +0000 (12:05 +0100)
committerVincent Bernat <vincent@bernat.ch>
Sun, 21 Mar 2021 11:05:16 +0000 (12:05 +0100)
commit2e304488fac220fa205780a80533a2b955ee6b6d
tree81fbf49bafe78abef1cf130ae7acc7877acb105a
parentf7eae6f879d89d2a223774a253d80b6f0b5c5d01
daemon: annotate "daemonisation" to help Coverity

When daemonizing, we need to use /dev/null for stdin, stdout, and
stderr. If one of these file descriptors happen to be already closed,
we need to close the new file descriptor only if > 2. This is
confusing confusing for Coverity, annotate it correctly.

Not all locations are annotated because not all of them are detected,
for some reason.
src/compat/daemon.c
src/daemon/lldpd.c