X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <20090514233732.GA28103@ednor.casa.cgf.cx> References: <4A0B6BE4 DOT 1020905 AT cygwin DOT com> <4A0B751A DOT 30007 AT cygwin DOT com> <4A0B7CB2 DOT 5050203 AT byu DOT net> <17393e3e0905141420w19b8ef8fr4f58a0f5c7f49ee7 AT mail DOT gmail DOT com> <20090514230106 DOT GA27859 AT ednor DOT casa DOT cgf DOT cx> <20090514233732 DOT GA28103 AT ednor DOT casa DOT cgf DOT cx> Date: Fri, 15 May 2009 02:01:41 -0400 Message-ID: <17393e3e0905142301l24cdb1aboe5de9298a3496f31@mail.gmail.com> Subject: Re: Question of the necessity of rebaseall From: Matt Wozniski To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Thu, May 14, 2009 at 7:37 PM, Christopher Faylor wrote: > On Thu, May 14, 2009 at 11:23:08PM +0000, Eric Blake wrote: >>Christopher Faylor writes: >>We can't say it enough: >> >>>>>Read the source. >>>>Is this a place where using vfork() instead of fork() helps (where it's >>>>applicable, of course)? =C2=A0If so, we might be able to reduce the num= ber >>>>of rebase failures in the future just by trying to push other projects >>>>to use vfork wherever it's substitutable for fork... >>> >>>In Cygwin vfork =3D=3D fork. >> >>But, if you really wanted to be nice, instead of forcing us to respond >>to your uneducated guesses, you could implement posix_spawn, and push >>for more upstream projects (particularly bash) to use it. =C2=A0That is at >>least one case where people have already implemented posix_spawn on top >>of fork (and in fact, gnulib has already done so, and m4 uses the >>gnulib implementation), but where you can also implement it more >>efficiently on top of native windows semantics if you do it right. =C2=A0= And >>maybe, in the process of seeing how many loose ends there are to get it >>to have posix_spawn work correctly, you will start to understand why we >>haven't already implemented it, and why cygwin does fork/vfork the way >>it does. > > Yes. =C2=A0What he said. > > I meant to reiterate the "Read the source" advice. =C2=A0It really isn't = very > polite to keep asking us to explain things to you when 1) any reasonable > person would conclude that most of these issues had already been > discussed to death and 2) there is source code available. *nod* - didn't mean to stress the tolerance of people who knew better, just figured I'd try jumping on the asking questions bandwagon while smarter people were still answering. :) I looked at the source before asking, noticed that it had a vfork implementation surrounded with #ifdef NEWVFORK that did something other than wrap fork(), and couldn't piece together if that code is usually compiled with NEWVFORK defined or not. And since I couldn't think of any reason why the vfork would need to put the libraries or the rest of the heap in the child's address space (since it's explicitly undefined behavior if the child tries to call any functions or assign any variables in them), I figured it was worth asking. When I couldn't find the answers by checking the list archives, I figured it wouldn't hurt to ask. Hope I didn't inconvenience anyone too much; I must just not see why vfork needs to keep the cygheap. ~Matt -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/