[Patches] [ python-Patches-775605 ] Cygwin pthread_sigmask() workaround patch

SourceForge.net noreply@sourceforge.net
Tue, 22 Jul 2003 08:05:18 -0700


Patches item #775605, was opened at 2003-07-22 04:31
Message generated for change (Comment added) made by jlt63
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=775605&group_id=5470

Category: Build
Group: None
Status: Open
Resolution: Accepted
Priority: 9
Submitted By: Jason Tishler (jlt63)
>Assigned to: Tim Peters (tim_one)
Summary: Cygwin pthread_sigmask() workaround patch

Initial Comment:
Cygwin's pthread_sigmask() implementation appears
to be buggy. This patch works around this problem
by using sigprocmask() instead.

This patch is implemented in a general way so it
could be used by other platforms too. If this
approach is deemed too risky, then I can work up a
patch that just hacks Python/thread_pthread.h for
Cygwin.

Note that I tested this patch against 2.3c1 under
Red Hat Linux 8.0 too.

I'm assigning this to Barry because I'm afraid to
commit any changes so close to the release date.
Additionally, I would like one of the autoconf
wizards to review my patch to make sure I didn't
screw up.  And finally, I need someone to
regenerate pyconfig.h.in and configure with the
same versions of the autotools that are normally
used by Python.

----------------------------------------------------------------------

>Comment By: Jason Tishler (jlt63)
Date: 2003-07-22 07:05

Message:
Logged In: YES 
user_id=86216

Yeah, what he said! :,)

This is one of the reasons why I asked someone to
regenerate pyconfig.h.in and configure. Note that
Cygwin is currently at the following version:

$ autoconf --version
autoconf (GNU Autoconf) 2.57

If Tim gives the thumbs up, then I will commit Neal's
version of my patch.



----------------------------------------------------------------------

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2003-07-22 07:03

Message:
Logged In: YES 
user_id=12800

Tim, Neal: thanks.

Jason: go ahead and check it into the trunk, then close this
bug report.


----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2003-07-22 06:52

Message:
Logged In: YES 
user_id=31435

Not to worry, Barry -- it can't break anything for the MS 
Windows build, because that build doesn't use any of the files 
this patch changes (MS Windows isn't a pthreads platform, 
and doesn't use the configure stuff either).

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-07-22 06:50

Message:
Logged In: YES 
user_id=33168

"i" was the one that moved __BSD_VISIBLE.  It's what
autoconf 2.53 produced.  __BSD_VISIBLE was added by 1.82
(aimacint 02-Jul-03).  It's fine to move it around, I just
didn't modify the output of autoconf.

----------------------------------------------------------------------

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2003-07-22 06:42

Message:
Logged In: YES 
user_id=12800

Jason, why did you move the definition of __BSD_VISIBLE in
pyconfig.h?  Is this necessary for your fix?  If not, can
you back it out (it just makes me nervous on principle
although it's probably harmless :)

Other than that, it seems fine and doesn't break anything
for me on RH9 <wink>.  Assigning to Tim to make sure it
doesn't break anything on Windows.  If he green lights it,
then please go ahead and check it into the head.


----------------------------------------------------------------------

Comment By: Skip Montanaro (montanaro)
Date: 2003-07-22 05:59

Message:
Logged In: YES 
user_id=44345

Jason's patch worked for me on Mac OS X.


----------------------------------------------------------------------

Comment By: Jason Tishler (jlt63)
Date: 2003-07-22 05:11

Message:
Logged In: YES 
user_id=86216

> I don't know much about autoconf, but it seems
> ok.  I'm not sure why you put the case inside
> the AC_CHECK_FUNCS. I don't know if it matters
> either way.

I put the case statement inside of AC_CHECK_FUNCS
so that HAVE_BROKEN_PTHREAD_SIGMASK is only
defined if HAVE_PTHREAD_SIGMASK is defined.

> Attached a new patch with generated configure
> and pyconfig.h.in.  The new patch includes the
> two files in Jason's original patch.

Thanks!

> Oh, one other question which isn't directly
> related to this patch.  Why is CYGWIN in
> uppercase throughout configure.in, except for
> line 117?

I can't explain line 117, but CYGWIN is uppercase
because of the following:

$ uname -s
CYGWIN_NT-5.0

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-07-22 04:51

Message:
Logged In: YES 
user_id=33168

I don't know much about autoconf, but it seems ok.  I'm not
sure why you put the case inside the AC_CHECK_FUNCS. I don't
know if it matters either way.

Attached a new patch with generated configure and
pyconfig.h.in.  The new patch includes the two files in
Jason's original patch.

Oh, one other question which isn't directly related to this
patch.  Why is CYGWIN in uppercase throughout configure.in,
except for line 117?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=775605&group_id=5470