Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Sun, 15 Apr 2001 15:33:17 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: fork expert needed: (was Re: pthreads update for the adventurous) Message-ID: <20010415153317.C9015@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <037701c0c3ab$9049bf30$0200a8c0 AT lifelesswks> <20010413221222 DOT C5606 AT dothill DOT com> <006001c0c4af$179b79c0$0200a8c0 AT lifelesswks> <20010414223139 DOT A906 AT redhat DOT com> <001701c0c557$02a861b0$0200a8c0 AT lifelesswks> <20010415090600 DOT A8359 AT redhat DOT com> <001301c0c5af$9cb7e520$0200a8c0 AT lifelesswks> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: <001301c0c5af$9cb7e520$0200a8c0@lifelesswks>; from robert.collins@itdomain.com.au on Sun, Apr 15, 2001 at 11:25:58PM +1000 On Sun, Apr 15, 2001 at 11:25:58PM +1000, Robert Collins wrote: > > >----- Original Message ----- >From: "Christopher Faylor" >To: >Sent: Sunday, April 15, 2001 11:06 PM >Subject: Re: fork expert needed: (was Re: pthreads update for the >adventurous) > > >> On Sun, Apr 15, 2001 at 12:51:44PM +1000, Robert Collins wrote: >>>>I added this dll relocation stuff last year to help with perl. It >>>>wasn't fun. >>> >>>Oh. Well I infer that it only occurs with threads enabled in python, >>>or Jason wouldn't be telling us. Any hints Chris for possible >>>races/locks that might prevent the child doing the relocation if the >>>parent has active threads ? >> >>I believe the relocation happens during DLL initialization when all >>other threads are suspended. >> >>cgf >> > >fork() doesn't suspend all the threads in the parent. The thread doing >the call blocks, and the child is started with only one thread. I >don't believe all the threads are meant to be suspended under posix >threads either - but I'll look into this. Let me say this again: "I believe the relocation happens during DLL initialization when all other threads are suspended." Please read up on MSDN on what happens during DLL initialization with threads and stuff. This isn't a Cygwin thing, it's a windows thing. cgf -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple