delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/08/01/11:13:24

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Subject: Re: RFC: TLS problem
From: Robert Collins <rbcollins AT cygwin DOT com>
To: Thomas Pfaff <tpfaff AT gmx DOT net>
Cc: cygwin-developers AT cygwin DOT com
In-Reply-To: <Pine.WNT.4.44.0208011634350.331-100000@algeria.intern.net>
References: <Pine DOT WNT DOT 4 DOT 44 DOT 0208011634350 DOT 331-100000 AT algeria DOT intern DOT net>
Date: 02 Aug 2002 01:13:17 +1000
Message-Id: <1028214797.7511.37.camel@lifelesswks>
Mime-Version: 1.0

--=-dqNuIGtWrPimJQuCnzW9
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Fri, 2002-08-02 at 00:48, Thomas Pfaff wrote:
> While tracking down the problems with a threaded perl i recognized a
> problem with TLS that is probably the reason for the forked child crash:

Good catch.=20

TLS and pthread_keys are different. At worst all we need to do for
pthread_key support is recreate the TLS for each pthread_key, and copy
the value for *the forking thread*. I.E. we don't need to handle all
cases of TLS behaviour, and we don't need to look behind the scenes at
the MS thread specific data. An atfork() handler registered by
pthread_key_create will do this nicely, and be almost trivial to code.

It is worthwhile checking the IEEE spec on this one before coding
anything, because I *thought* I had coded to that already.

As far as supporting a win32 TLS using application that wants to fork,
well it's an interesting idea, but IMO inpractical. Adding fork()
support to WIN32 native calls is a whole project in and of itself.

Cheers,
Rob


--=-dqNuIGtWrPimJQuCnzW9
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEABECAAYFAj1JUA0ACgkQI5+kQ8LJcoI2fgCfQZNw53wWgvS2sodglVW0G6P+
df8AnRevrRYEZ5DTohSKvBFzE4yMJL5t
=gLhc
-----END PGP SIGNATURE-----

--=-dqNuIGtWrPimJQuCnzW9--

- Raw text -


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