(patch) enable signals in dynamically loaded Cygwin DLL

Chris Faylor cgf@cygnus.com
Mon Dec 6 20:48:00 GMT 1999


On Mon, Dec 06, 1999 at 09:51:31PM -0600, Mumit Khan wrote:
>Completely forgot about the synchronization used in makethread to avoid
>stack corruption, and that's why enabling signals for dynamically loaded
>Cygwin was crashing in newly created threads.
>
>This change removes the synchronization and uses dynamically allocated
>memory to the thread stub routine, which frees the memory. The overhead
>should be roughly the same, perhaps a tiny bit higher due to malloc's
>internal MT synchronization.
>
>A gotcha for future users of makethread -- if you pass a thread parameter,
>make sure it's not on the stack (which is the case currently, so it should
>be safe). 

Note that this probably affects tty initialization too.  It's not just
signals that are affected, it's any thread that is started during DLL
initialization.  Since CYGWIN=tty implies the creation of several runtime
threads, I assume that the problem is manifested there as well.

cgf


More information about the Cygwin-developers mailing list