summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/daemon.c')
-rw-r--r--lib/libc/gen/daemon.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/gen/daemon.c b/lib/libc/gen/daemon.c
index 6b3409c..0c490e5 100644
--- a/lib/libc/gen/daemon.c
+++ b/lib/libc/gen/daemon.c
@@ -29,6 +29,8 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#if defined(LIBC_SCCS) && !defined(lint)
@@ -60,12 +62,12 @@ daemon(nochdir, noclose)
if (!nochdir)
(void)chdir("/");
- if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
+ if (!noclose && (fd = _libc_open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
(void)dup2(fd, STDIN_FILENO);
(void)dup2(fd, STDOUT_FILENO);
(void)dup2(fd, STDERR_FILENO);
if (fd > 2)
- (void)close (fd);
+ (void)_libc_close(fd);
}
return (0);
}
OpenPOWER on IntegriCloud