Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Oct 1998 14:20:09 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@FreeBSD.ORG, peter@netplex.com.au
Cc:        cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libc/gen popen.c
Message-ID:  <199810110420.OAA06194@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>   Modified files:
>>     lib/libc/gen         popen.c 
>>   Log:
>>   vfork -> fork.  The child calls execl() which calls malloc(), so
>>   vfork() can't be used.  We could use alloca() in execl() so that

>Why not fix it properly by not using execl()?

I didn't think of such a simple fix, and it's not urgent.  You still
have to look at the execv(3) sources to see that it doesn't call malloc().
Using execve(2) would be safer.

>fork() is significantly slower than vfork(), especially with a complex 
>address space with lots of maps that fork() has to clone.  It'll all the 
>malloc calls in execl() too.

I know, so I thought fixing /bin/sh was more urgent :-).

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810110420.OAA06194>