This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [Dr.Volker.Zell@oracle.com: Re: uxterm from xterm-185-3 and xfontsel crashing when running under cygserver support]
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 30 Mar 2004 15:55:14 +0200
- Subject: Re: [Dr.Volker.Zell@oracle.com: Re: uxterm from xterm-185-3 and xfontsel crashing when running under cygserver support]
- References: <7168.1080653666@www58.gmx.net>
- Reply-to: cygwin-patches at cygwin dot com
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?
> But you can also change cygrunsrv to create a thread via pthread_create and
> fork from this thread. This should work either.
That's not the way to go, IMO. It requires *all* Cygwin applications
written to be started under SCM to be rewritten.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.