vfork -> fork. This home made popen() had the same bug as the library

popen(), but worse.  The child calls execvp(), which calls malloc()
a bit more than execl(), and it calls non-library functions that call
malloc() and who-knows-what else (stdio is called in at least some
error cases).
This commit is contained in:
Bruce Evans 1998-10-10 19:18:30 +00:00
parent 4689d219ff
commit db6b691087
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40188

View file

@ -231,7 +231,7 @@ start_command(cmd, mask, infd, outfd, a0, a1, a2)
{
int pid;
if ((pid = vfork()) < 0) {
if ((pid = fork()) < 0) {
perror("fork");
return -1;
}