--- Begin Message ---
- To: Julian Elischer <julian@xxxxxxxxxxxx>
- Subject: Re: Changes from 5.2.1 to 5.3 (theads / signal handling)
- From: Jose Marcio Martins da Cruz <Jose-Marcio.Martins@xxxxxxxx>
- Date: Wed, 25 Jan 2006 21:39:30 +0100
- Cc: freebsd-hackers@xxxxxxxxxxx
- In-reply-to: <43D7C786.1090803@xxxxxxxxxxxx>
- References: <43D74F91.2090009@xxxxxxxx> <43D7C786.1090803@xxxxxxxxxxxx>
- Reply-to: Jose-Marcio.Martins@xxxxxxxx
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920
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:
smime.p7s
Description: S/MIME Cryptographic Signature
--- End Message ---