Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: SHOWSTOPPER: [was Re: vfscanf in newlib] X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0 content-class: urn:content-classes:message Date: Mon, 23 Apr 2001 09:29:19 +1000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: SHOWSTOPPER: [was Re: vfscanf in newlib] Thread-Index: AcDLg2T2F+sODJjfTGS9+Rw61mF5sAAAJgUQ From: "Robert Collins" To: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id TAA27368 Ok if I check this in? Index: ChangeLog =================================================================== RCS file: /cvs/src/src/winsup/cygwin/ChangeLog,v retrieving revision 1.657 diff -u -p -r1.657 ChangeLog --- ChangeLog 2001/04/22 23:18:27 1.657 +++ ChangeLog 2001/04/22 23:36:31 @@ -1,3 +1,7 @@ +Mon Apr 23 9:27:00 2001 Robert Collins + + * thread.cc (MTinterface::Init): Always initialise per process variables. + Sun Apr 22 19:18:18 2001 Christopher Faylor * features.h: Reinstate as wrapper for sys/features.h. Index: thread.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/thread.cc,v retrieving revision 1.26 diff -u -p -r1.26 thread.cc --- thread.cc 2001/04/21 23:26:14 1.26 +++ thread.cc 2001/04/22 23:36:32 @@ -294,16 +294,16 @@ MTinterface::Init (int forked) concurrency = 0; threadcount = 1; /* 1 current thread when Init occurs.*/ + mainthread.win32_obj_id = myself->hProcess; + mainthread.setThreadIdtoCurrent (); + /* store the main thread's self pointer */ + TlsSetValue (thread_self_dwTlsIndex, &mainthread); + if (forked) return; /* possible the atfork lists should be inited here as well */ - mainthread.win32_obj_id = myself->hProcess; - mainthread.setThreadIdtoCurrent (); - /* store the main thread's self pointer */ - TlsSetValue (thread_self_dwTlsIndex, &mainthread); - for (int i =0;i<256;i++)pshared_mutexs[i]=NULL; #if 0 > -----Original Message----- > From: Christopher Faylor [mailto:cgf AT redhat DOT com] > Sent: Monday, April 23, 2001 9:32 AM > To: cygwin-developers AT cygwin DOT com > Subject: Re: SHOWSTOPPER: [was Re: vfscanf in newlib] > > > On Mon, Apr 23, 2001 at 09:10:04AM +1000, Robert Collins wrote: > >> -----Original Message----- > >> From: Christopher Faylor [mailto:cgf AT redhat DOT com] > >> Sent: Monday, April 23, 2001 9:16 AM > >> To: cygwin-developers AT cygwin DOT com > >> Subject: Re: SHOWSTOPPER: [was Re: vfscanf in newlib] > >> > >> > >> On Mon, Apr 23, 2001 at 08:59:47AM +1000, Robert Collins wrote: > >> >I might be a cancellation point being checked before > MTInterface is > >> >initialised. If thats the case, I suggest that MTInterface is > >> >initialised earlier. > >> > >> It should be initialized pretty early. I don't see any way > >> for /etc/passwd > >> to be read prior to this initialization. > >> > >> This is the initialization in question, right: > >> > >> user_data->threadinterface->Init (user_data->forkee); > >> > > > >Yes. > > > >Actually can you tell me - the if (forked) below only runs in spawned > >cygwin process's ? If so I've got a few bugs to fix.. > > It only runs in non-forked processes. > > cgf >