[prev in list] [next in list] [prev in thread] [next in thread]
List: stunnel-users
Subject: SIGCHLD race in forking stunnel
From: Henrik Eriksson <henrik.eriksson () axis ! com>
Date: 2002-10-30 18:16:04
[Download RAW message or body]
Hello
I've been doing some tests on stunnel (3.22 and 4.03) in
fork mode an a linux system. There seem to be a race related
to SIGCHLD that results in the client counter
(stunnel.c:options.clients in 3.22, stunnel.c:num_clients
in 4.03) loosing count on the actual number of clients.
The problem is that the client counter is touched both in
sigchld_handler and in the daemon loop. SIGCHLD is not
blocked in the daemon loop while the counter is being
modified so if SIGCHLD is delivered at that time the state
of the counter will be undefined.
Blocking SIGCHLD while modifying num_clients in the daemon
loop (stunnel.c:accept_connection() in 4.03) fixes this
problem on the system I am testing on.
Best regards,
Henrik
--
Henrik Eriksson
Senior Software Engineer
Embedded Applications
Axis Communications AB
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic