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 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: Threaded Cygwin Python Import Problem X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0 Date: Thu, 19 Jul 2001 10:58:06 +1000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Threaded Cygwin Python Import Problem Thread-Index: AcEP5g+sDu6ipZQfRhe+dit65l/HIAAB7Whw From: "Robert Collins" To: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id VAA31083 Do WIN32 handles need to be specially opened to allow them to be inherited into the child process created by fork? Thats the only thing that needs fixing AFAICT. Rob > -----Original Message----- > From: Christopher Faylor [mailto:cgf AT redhat DOT com] > Sent: Thursday, July 19, 2001 10:09 AM > To: cygwin AT cygwin DOT com > Subject: Re: Threaded Cygwin Python Import Problem > > > On Wed, Jul 18, 2001 at 07:47:38PM -0400, Greg Smith wrote: > > > >I think I've recreated Jason's threaded Python problem after fork(), > >see the testcase below. And this is on my w2k sp2 dual pIII 850 > >machine, where I have been unsuccessful in recreating Jason's > >original Python testcase. > > > >I certainly do not claim Cygwin expertise, nor Windows API expertise, > >and not as much *ix as I'd like (ask me about os/390, however, and > >I'll give you a different story ;-). > > > >But, it looks like fork_copy() blindly copies everything from the > >original process address space to the new address space, including > >any pthread_mutex_t structures. And neither __pthread_mutex_lock > >nor WaitForSingleObject() recognize that the mutex is not properly > >initialized. If the comments in the testcase are removed (ie clear > >the lock and initialize it), then the testcase runs as expected. > > If that is the case then a "fixup_after_fork" routine is probably > required. You can see several of those in fork.cc. > > cgf > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/