This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question of the necessity of rebaseall

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)? ÂIf so, we might be able to reduce the number
>>>>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 == 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. ÂThat 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. Â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. ÂWhat he said.
> I meant to reiterate the "Read the source" advice. ÂIt 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


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.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]