X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 	tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4AD9EC2F.4060306@cwilson.fastmail.fm>
Date: Sat, 17 Oct 2009 12:09:19 -0400
From: Charles Wilson <cygwin@cwilson.fastmail.fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: GNU pth + cygwin + fork [Was: Re: fork failure?]
References: <4AD732C7.4020301@cwilson.fastmail.fm> <4AD73B83.9060505@gmail.com> <4AD74586.8070803@cwilson.fastmail.fm> <4AD752C8.2040908@gmail.com> <4AD7B135.6020401@cwilson.fastmail.fm> <4AD8220D.8000908@cwilson.fastmail.fm> <4AD8AD47.6010605@cwilson.fastmail.fm> <4AD8B90B.4040507@gmail.com> <4AD8CD8A.7010708@cwilson.fastmail.fm> <4AD8D490.2040000@gmail.com> <4AD8DAC3.2080709@cwilson.fastmail.fm> <4AD93CA2.6020002@cwilson.fastmail.fm> <4AD95908.9020208@gmail.com> <4AD96A3B.6010901@cwilson.fastmail.fm> <4AD992A9.1030708@cwilson.fastmail.fm> <4AD999B3.3030907@cwilson.fastmail.fm> <4AD9E829.8020404@gmail.com>
In-Reply-To: <4AD9E829.8020404@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Dave Korn wrote:
>   My first thought would be to figure out what pth is attempting to do while
> messing in jmp_buf, and make it work.  It's bad, unmaintainable code, that
> will break again in the future if ever jmp_buf is rearranged - but it only has
> to stagger along for another couple of months until you can do it right using
> sigaltstack.

I did consider that, but frankly this whole business of "adjusting the
stack" by messing around inside the undocumented jmp_buf scares the
*bleep* out of me.  WAY too easy to get wrong, and my asm skills are too
rusty -- and too non-x86 -- to be trusted.

> Until then, slapping a band-aid on pth might be a lot less
> work-that-soon-has-to-be-thrown-away than hacking both libassuan and gpg to
> handle a different API.  (I say this without having yet done the research to
> figure out exactly what pth thinks it is doing to that jmp_buf and whether
> it's necessarily possible, but it ought to be.)

I'm sure it's possible, but IMO migrating libassuan/gnupg is easier --
for me.  As it turns out, in libassuan there's only one file that needs
to be modified. gnupg is a bit trickier, but not terrible -- and the
APIs, while annoyingly different, aren't totally dissimilar.

--
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

