summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-10-10 19:30:45 +0000
committerbde <bde@FreeBSD.org>1998-10-10 19:30:45 +0000
commit2b75a45bd4e1851438f3cdd00ff724060dc09441 (patch)
treeea82a36911473f8d9e8b9eccbab0fd1f3556c48a /lib
parent04193443e723f220d7454e40175cb29674e0dbd1 (diff)
downloadFreeBSD-src-2b75a45bd4e1851438f3cdd00ff724060dc09441.zip
FreeBSD-src-2b75a45bd4e1851438f3cdd00ff724060dc09441.tar.gz
vfork -> fork. The child calls execl() which calls malloc(), so
vfork() can't be used. We could use alloca() in execl() so that it can be called between vfork() and execve(), but a "portable" popen() shouldn't depend on this. Calling execle() instead of execl() should be fairly safe, since execle() is supposed to be callable from signal handlers and signal handlers can't call malloc(). However, execle() is broken.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/popen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c
index 8cb7950..d7ea414 100644
--- a/lib/libc/gen/popen.c
+++ b/lib/libc/gen/popen.c
@@ -84,7 +84,7 @@ popen(command, type)
return (NULL);
}
- switch (pid = vfork()) {
+ switch (pid = fork()) {
case -1: /* Error. */
(void)close(pdes[0]);
(void)close(pdes[1]);
OpenPOWER on IntegriCloud