[Dr.Volker.Zell@oracle.com: Re: uxterm from xterm-185-3 and xfontsel crashing when running under cygserver support]

Thomas Pfaff tpfaff@gmx.net
Tue Mar 30 14:39:00 GMT 2004

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
> > 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
> > it handles such a situation properly and will keep the pthread_self
> > 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_main.patch
Type: plain/text
Size: 1472 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20040330/2a5762ed/attachment.bin>

More information about the Cygwin-patches mailing list