This is the mail archive of the cygwin-patches@cygwin.com 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: [Dr.Volker.Zell@oracle.com: Re: uxterm from xterm-185-3 and xfontsel crashing when running under cygserver support]


Corinna Vinschen wrote:
> On Mar 30 15:34, Thomas Pfaff wrote:
> > Regardless whether a process is started from a cygwin app or not it will
> > always start at mainCRTStartup. 
> > 
> > When it is started by the SCM however the service_main thread is created
by
> > the SCM. The situation is similar to calling CreateThread instead of
> > pthread_create. The thread will be handled as anonymous since it is not
in the thread
> > list and has not been initialized in thread_init_wrapper.
> 
> Yeah, I just realized this while in the shower.
> 
> > I think the easiest way is to modify pthread::init_mainthread in a way
that
> > it handles such a situation properly and will keep the pthread_self
pointer
> > unchanged after a fork.
> 
> Do you have an appropriate patch?
> 

2004-03-30  Thomas Pfaff  <tpfaff@gmx.net>

	* thread.h (pthread::init_mainthread): Add parameter forked.
	Set forked default to false..
	* thread.cc (MTinterface::fixup_after_fork): Call
	pthread::init_mainthread with forked = true.
	(pthread::init_mainthread): Add parameter forked. Do not change thread self
	pointer when forked.

-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz

Attachment: init_main.patch
Description: plain/text


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