[OpenSIPS-Devel] [OpenSIPS/opensips] fcf8a9: Fix race condition on terminating child procs.
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Apr 15 11:27:54 CEST 2015
Branch: refs/heads/2.1
Home: https://github.com/OpenSIPS/opensips
Commit: fcf8a935ca50a81c0f67e54ec6ec1e4b80016f84
https://github.com/OpenSIPS/opensips/commit/fcf8a935ca50a81c0f67e54ec6ec1e4b80016f84
Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
Date: 2015-04-15 (Wed, 15 Apr 2015)
Changed paths:
M main.c
M pt.c
Log Message:
-----------
Fix race condition on terminating child procs.
There is a race condition between a child getting initalized (and properly setting all its vars like is_main, pid, etc) and main process trying to terminate that child proc (due a failed startup).
Use the pt[].pid as a marker to know when the child is init (to be filled only by child). Main proc (when delivering signals) will do a busy waiting if a proc haven't set its pid (still doing init).
Closes #463
(cherry picked from commit 4884d6c921695c588b8076ded186665504550773)
More information about the Devel
mailing list