From 8a0b43005ad9ea011b80d66e32b46fb430ddaffb Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 1 Dec 2005 20:43:44 +0000 Subject: Hide mostly used functions --- libc/stdio/popen.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libc/stdio/popen.c') diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c index c7887ad41..6de09253c 100644 --- a/libc/stdio/popen.c +++ b/libc/stdio/popen.c @@ -84,23 +84,23 @@ FILE *popen(const char *command, const char *modes) parent_fd = pipe_fd[1-child_writing]; if (!(fp = fdopen(parent_fd, modes))) { - close(parent_fd); - close(child_fd); + __close(parent_fd); + __close(child_fd); goto FREE_PI; } VFORK_LOCK; if ((pid = vfork()) == 0) { /* Child of vfork... */ - close(parent_fd); + __close(parent_fd); if (child_fd != child_writing) { dup2(child_fd, child_writing); - close(child_fd); + __close(child_fd); } /* SUSv3 requires that any previously popen()'d streams in the * parent shall be closed in the child. */ for (po = popen_list ; po ; po = po->next) { - close(po->f->__filedes); + __close(po->f->__filedes); } execl("/bin/sh", "sh", "-c", command, (char *)0); @@ -113,7 +113,7 @@ FILE *popen(const char *command, const char *modes) /* We need to close the child filedes whether vfork failed or * it succeeded and we're in the parent. */ - close(child_fd); + __close(child_fd); if (pid > 0) { /* Parent of vfork... */ pi->pid = pid; -- cgit v1.2.3