Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jan 2006 21:49:34 +0100
From:      Jose Marcio Martins da Cruz <Jose-Marcio.Martins@ensmp.fr>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Changes from 5.2.1 to 5.3 (theads / signal handling)
Message-ID:  <43D7E45E.8070103@ensmp.fr>
In-Reply-To: <43D7C786.1090803@elischer.org>
References:  <43D74F91.2090009@ensmp.fr> <43D7C786.1090803@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Julian Elischer wrote:
> Jose Marcio Martins da Cruz wrote:

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

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

The signal handler thread is launched by the following sequence of instructions.

   sigemptyset(&set);

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

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

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

Thanks for your help.

Jos-Marcio



[-- Attachment #2 --]
0	*H
010	+0	*H

(000
	*H
0y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing Authority1!0	*H
	support@cacert.org0
060121144820Z
070121144820Z0S1$0"UJose-Marcio Martins da Cruz1+0)	*H
	Jose-Marcio.Martins@ensmp.fr0"0
	*H
0
̮PْOE4Re4i\E}<_)#Ss}A.m\]O@aJ/„Ƅ_"P⸧B<x	[s4g
P#^PEHzCb׋;aG\Q$\dYvc}gh 70,kt跾n|K/m̧ٺLv62,@֯Fdz5qU;|'00U00V	`HB
IGTo get your own certificate for FREE head over to http://www.CAcert.org02+&0$0"+0http://ocsp.cacert.org0'U 0Jose-Marcio.Martins@ensmp.fr0
	*H
H
h5&'
t
RL}A|36'[N"ئWݣϑ2D#+;/uZQ7%ytWUAITЖ fjyн7"r%0HV25;q1JwzCK+aiCUYcPr',#A5$q9lv{{*NB>748]y){xELptLA/>ҋVQumD[tF
xEP=1{#8"l
pHc{\JqP"]5)[Gsi6B,_S)򢽺yW^8 xA{ʲֲ ʋJG8>͞%H#`|a/*4vr~YlG厍107e$ي8"~ZQ2h
kP	Ӽ82CZ`~=50Maac,_Mο000
	*H
0y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing Authority1!0	*H
	support@cacert.org0
060121144820Z
070121144820Z0S1$0"UJose-Marcio Martins da Cruz1+0)	*H
	Jose-Marcio.Martins@ensmp.fr0"0
	*H
0
̮PْOE4Re4i\E}<_)#Ss}A.m\]O@aJ/„Ƅ_"P⸧B<x	[s4g
P#^PEHzCb׋;aG\Q$\dYvc}gh 70,kt跾n|K/m̧ٺLv62,@֯Fdz5qU;|'00U00V	`HB
IGTo get your own certificate for FREE head over to http://www.CAcert.org02+&0$0"+0http://ocsp.cacert.org0'U 0Jose-Marcio.Martins@ensmp.fr0
	*H
H
h5&'
t
RL}A|36'[N"ئWݣϑ2D#+;/uZQ7%ytWUAITЖ fjyн7"r%0HV25;q1JwzCK+aiCUYcPr',#A5$q9lv{{*NB>748]y){xELptLA/>ҋVQumD[tF
xEP=1{#8"l
pHc{\JqP"]5)[Gsi6B,_S)򢽺yW^8 xA{ʲֲ ʋJG8>͞%H#`|a/*4vr~YlG厍107e$ي8"~ZQ2h
kP	Ӽ82CZ`~=50Maac,_Mο1000y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing Authority1!0	*H
	support@cacert.org0	+0	*H
	1	*H
0	*H
	1
060125204934Z0#	*H
	1IG	;x}0R	*H
	1E0C0
*H
0*H
0
*H
@0+0
*H
(0	+7100y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing Authority1!0	*H
	support@cacert.org0*H
	10y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing Authority1!0	*H
	support@cacert.org0
	*H
A땭~葀Ը0ٖS:ا[U12q\^/NW`Byx^)>3{HrSRl~4^L9=F8g(jnGJЂq)Gj9=yLV9w #&n0''Eev"tPW7
h\ȫ1{wiHpG
ݲ^|RVykl8B/ا9

q

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