delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/15/16:43:33

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-ID: <4D7FCF36.5090802@cwilson.fastmail.fm>
Date: Tue, 15 Mar 2011 16:42:30 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
Reply-To: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Calling sem_wait() in DllMain( DLL_THREAD_DETACH) crashes
References: <4D7FB133 DOT 7030301 AT dronecode DOT org DOT uk> <20110315190733 DOT GA23825 AT ednor DOT casa DOT cgf DOT cx> <4D7FC59F DOT 6030901 AT cwilson DOT fastmail DOT fm> <20110315202816 DOT GA8747 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20110315202816.GA8747@ednor.casa.cgf.cx>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 3/15/2011 4:28 PM, Christopher Faylor wrote:
> On Tue, Mar 15, 2011 at 04:01:35PM -0400, Charles Wilson wrote:
>> There are cases where cygwin-ish code does win32-ish things, like
>> login.exe, or the PyWin32 extensions for Python-on-Windows(and cygwin).
>> Maybe twisty uses PyWin32?
> 
> The python Twisted stuff works on UNIX systems so there should be no
> reason to use Windows-isms in Cygwin code - especially when the
> Windows-ism *calls* UNIX code.  The ability to get into trouble when you
> mix Windows stuff like DllMain with Cygwin stuff is very high.

Absolutely.

>> However, it does seem that python (or one of its extensions) is doing
>> something it shouldn't.
>>
>>From http://msdn.microsoft.com/en-us/library/ms682583%28v=vs.85%29.aspx
>>> ...
> 
> i.e., "you aren't supposed to be able to call anything you like here"
> 
> i.e., "you can't do that"

I was agreeing with you, already. :-)

Given that Jon mentioned other, similar reports, involving other
libraries/extensions for python...I wonder if there's something in the
core of python (e.g. "how to build an extension DLL: this glue code will
be included in the xDLL automatically by pyDist::Builder [or whatever],
defining a custom DllMain()...") that's doing something windows-ish,
when it ought to be doing it unix-ish on cygwin.

E.g. I wonder if this is bigger than just Twisted, or just
openssl+python/Lib/thread [1,2]  etc.

[1] http://cygwin.com/ml/cygwin/2008-11/msg00341.html
[2] http://www.mail-archive.com/openssl-dev AT openssl DOT org/msg24599.html

--
Chuck


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019