[PATCH] check for valid pthread_self pointer

Thomas Pfaff tpfaff@gmx.net
Wed Aug 7 08:19:00 GMT 2002


This patch should fix the problem with the ipc-daemon started as service
and threads that are not created by pthread_create.
Actually it will only check for a valid thread_self pointer in different
functions to avoid a SEGV.
The pthread functions therefore can not be used within a service main
thread or a thread started by CreateThread (but you can of course
start new threads with pthread_create that can make use of it).

Thomas

Changelog

2002-08-07  Thomas Pfaff  <tpfaff@gmx.net>

	* pthread.cc: Include errno.h.
	(pthread_exit): Check for a valid pthread_self pointer.
	(pthread_setcancelstate): Ditto.
	(pthread_setcanceltype): Ditto.
	(pthread_testcancel): Ditto.
	(_pthread_cleanup_push): Ditto.
	(_pthread_cleanup_pop): Ditto.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pthread_self.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020807/6594a975/attachment.ksh>


More information about the Cygwin-patches mailing list