summaryrefslogtreecommitdiff
path: root/libc/stdio/popen.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-01 20:43:44 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-01 20:43:44 +0000
commit8a0b43005ad9ea011b80d66e32b46fb430ddaffb (patch)
tree418818740042c5dbba244bc1efc760c8d29e47a9 /libc/stdio/popen.c
parent42b161bb716f35948fabd36472fb59cd0a20fa92 (diff)
Hide mostly used functions
Diffstat (limited to 'libc/stdio/popen.c')
-rw-r--r--libc/stdio/popen.c12
1 files changed, 6 insertions, 6 deletions
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;