From owner-freebsd-hackers Tue Oct 22 5:31:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 161C837B401 for ; Tue, 22 Oct 2002 05:31:09 -0700 (PDT) Received: from straylight.ringlet.net (office.sbnd.net [217.75.140.130]) by mx1.FreeBSD.org (Postfix) with SMTP id AA6F243E3B for ; Tue, 22 Oct 2002 05:31:04 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 9070 invoked by uid 1000); 22 Oct 2002 12:30:38 -0000 Date: Tue, 22 Oct 2002 15:30:38 +0300 From: Peter Pentchev To: Bruce M Simpson Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: PThreads problem Message-ID: <20021022123038.GB378@straylight.oblivion.bg> Mail-Followup-To: Bruce M Simpson , freebsd-hackers@FreeBSD.ORG References: <1035200159.24315.13.camel@bilbo> <20021021124520.GS389@straylight.oblivion.bg> <1035206648.24315.20.camel@bilbo> <20021021134834.GA41198@straylight.oblivion.bg> <20021021135045.GB41198@straylight.oblivion.bg> <1035218026.24330.33.camel@bilbo> <20021021194453.GB377@straylight.oblivion.bg> <1035232308.24315.37.camel@bilbo> <3DB46BB8.46401DF5@mindspring.com> <20021022113132.GB16068@spc.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="A6N2fC+uXW/VQSAv" Content-Disposition: inline In-Reply-To: <20021022113132.GB16068@spc.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --A6N2fC+uXW/VQSAv Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 22, 2002 at 12:31:32PM +0100, Bruce M Simpson wrote: > On Mon, Oct 21, 2002 at 02:03:52PM -0700, Terry Lambert wrote: > > It is more correct to say that libcurl makes an assumption about > > signal delivery which is not guaranteed by POSIX, and therefore > > libcurl will not work with *any* POSIX compliant threads > > implementation which does not *happen* to work this way. >=20 > Would a more correct approach, when dealing with POSIX threads and signal= s, > be to make sure signals are delivered to a single thread *expressly for > that purpose*, and then use POSIX thread primitives (such as mutexes and > condvars) to communicate the signal conditions to the other threads? =2E.and when you start writing programs which depend on this functionality, they will not work on any system that does not do it. Part of the problem is that the linuxthreads approach of different threads as different processes would require that you deliver each and every signal destined for a 'worker' thread/process to the designated 'signal handler' thread/process; I am practically certain that no one in the Linux kernel crowd would like the idea of redirecting all signals from one process to another :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 No language can express every thought unambiguously, least of all this one. --A6N2fC+uXW/VQSAv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQE9tUTu7Ri2jRYZRVMRApyzAJ4iIZIR8mMQayH8MEn2fZiTqmF+sgCgxi+w tKIbLiuVG8BBm//qC2/z2Yo= =QzYb -----END PGP SIGNATURE----- --A6N2fC+uXW/VQSAv-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message