Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jan 2006 14:52:19 -0800
From:      Julian Elischer <julian@elischer.org>
To:        threads@freebsd.org
Subject:   [Fwd: Re: Changes from 5.2.1 to 5.3 (theads / signal handling)]
Message-ID:  <43D80123.5050503@elischer.org>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------050500030300040701010603
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit



--------------050500030300040701010603
Content-Type: message/rfc822;
	name="Re: Changes from 5.2.1 to 5.3 (theads / signal handling)"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
	filename="Re: Changes from 5.2.1 to 5.3 (theads / signal handling)"

Received: from localhost.localdomain (mar92-6-82-226-38-60.fbx.proxad.net
	[82.226.38.60])
	by idiom.com (8.12.11/8.12.11) with ESMTP id k0PKdgdO034379
	for <julian@elischer.org>; Wed, 25 Jan 2006 12:39:43 -0800 (PST)
	(envelope-from Jose-Marcio.Martins@ensmp.fr)
Received: from [127.0.0.1] (localhost. [127.0.0.1])
	by joe.j-chkmail.org (sendmail X.1.0.PreAlpha1.0) with ESMTP
	id S000000000000024E01; Wed, 25 Jan 2006 21:39:33 +0100
Message-ID: <43D7E202.2020607@ensmp.fr>
Date: Wed, 25 Jan 2006 21:39:30 +0100
From: Jose Marcio Martins da Cruz <Jose-Marcio.Martins@ensmp.fr>
Reply-To: Jose-Marcio.Martins@ensmp.fr
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Julian Elischer <julian@elischer.org>
CC: freebsd-hackers@freebsd.org
Subject: Re: Changes from 5.2.1 to 5.3 (theads / signal handling)
References: <43D74F91.2090009@ensmp.fr> <43D7C786.1090803@elischer.org>
In-Reply-To: <43D7C786.1090803@elischer.org>
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature";
	micalg=sha1; boundary="------------ms040702080701060306070401"
X-ClamAV-Status: No
X-Spam-Status: No, hits=-1.6 required=5 tests=BAYES_00,RCVD_IN_SORBS_DUL, AWL
X-Accessio-Status: NO, score=1.23,466590 version=6.0 count=2
X-Idiom-Reporting: If this was spam, please report it to http://www.spamcop.net

This is a cryptographically signed message in MIME format.

--------------ms040702080701060306070401
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Julian Elischer wrote:
> Jose Marcio Martins da Cruz wrote:

>=20
> a new threading library.

Hmmmm.

Here are my compile flags :

CPPFLAGS : only some -I and -D flags
CFLAGS   : -D_THREAD_SAFE -pthread
LDFLAGS  : -lmilter -lkvm -lm -lpthread

> have you tried 6.0?

Yes. It presents the same behaviour. Either way, I've found it with 6.0, =
and=20
tried back with previous versions till find when the change took place.

> also, does the child do an exec() after forking?

No. The child gets out the father loop and calls another initialisation f=
unction.

As It seemed to me that all father's threads are stopped in the forked pr=
ocess,=20
this seemed to me not be a problem. Am I right ?

The signal handler thread is launched by the following sequence of instru=
ctions.

   sigemptyset(&set);

   sigaddset(&set, SIGHUP);
   sigaddset(&set, SIGTERM);
   sigaddset(&set, SIGINT);
   sigaddset(&set, SIGUSR1);
   sigaddset(&set, SIGUSR2);

   if ((r =3D pthread_sigmask(SIG_BLOCK, &set, NULL)) !=3D 0)
   {
     errno =3D r;
     LOG_SYS_ERROR("Couldn't mask signals");
   }

   if ((r =3D pthread_create(&tid, NULL, filter_signal_handler, NULL)) !=3D=
 0)
     LOG_SYS_ERROR("Error launching filter_signal_handler");

Thanks for your help.

Jos=E9-Marcio



--------------ms040702080701060306070401
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIKKDCC
BRAwggL4oAMCAQICAwHW9zANBgkqhkiG9w0BAQUFADB5MRAwDg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ZQ0EgQ2VydCBTaWduaW5nIEF1dGhv
cml0eTEhMB8GCSqGSIb3DQEJARYSc3VwcG9ydEBjYWNlcnQub3JnAgMB1vcwDQYJKoZIhvcN
AQEBBQAEggEAhnyxcEW/cR4Pw9S4XP0c6U746if0a0Kn2hoqJkSAH1KiP7bAMWzxCS14is4x
bY0DfPYpZT6Qj/INb+Rz3sHCnc9HBbJua8+skYNVMXk1iWc3+31xcQWBeFkDCBQO2McjewBi
Yg13smP+swfbVi5zZlh2xdqRpI9wE5nzdIfLb4QNiO3OCd2zwJOq78i5PlG7JTF1laaZAhsq
8OAhEBla6y4b0J7OdQB/Tzi2NkkBdIZHoss8tUuODm5Z/xmrRbY63Z/MeDae6wbkoBivGxha
B5fcvANOOC0tiSlNCn6Kbr/U4qCnDhT+xMdinALSwQBqzBj1mF3XAouqu/HUt9ReOAAAAAAA
AA==
--------------ms040702080701060306070401--

--------------050500030300040701010603--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43D80123.5050503>