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  <[EMAIL PROTECTED]>

        * 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

Reply via email to