Track all child process so we never send a signal to an unrelated process (our child...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 3 May 2012 01:42:41 +0000 (11:42 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 3 May 2012 04:03:26 +0000 (14:03 +1000)
commita57eba2bb49b32f3dc69542de69b8b74ec9d3d09
tree020fe37817cc3736da55a60b7e9912de23a91b9b
parent85432ecc5383fe4aa0fc1af9d816b17cc0629f1e
Track all child process so we never send a signal to an unrelated process (our child died  and kernel wrapped the pid-space and reused the pid for a different process

Wrap all creation of child processes inside ctdb_fork() which is used to track all processes we have spawned.
Capture SIGCHLD to track also which child processes have terminated.

Wrap kill() inside ctdb_kill() and make sure that we never send a !0 signal to a child process pid that has already terminated (and might have been replaced with a

(This used to be ctdb commit f73a4b1495830bcdd094a93732a89dd53b3c2f78)
17 files changed:
ctdb/Makefile.in
ctdb/common/ctdb_fork.c [new file with mode: 0644]
ctdb/common/ctdb_util.c
ctdb/include/ctdb_private.h
ctdb/server/ctdb_call.c
ctdb/server/ctdb_daemon.c
ctdb/server/ctdb_freeze.c
ctdb/server/ctdb_lockwait.c
ctdb/server/ctdb_recover.c
ctdb/server/ctdb_recoverd.c
ctdb/server/ctdb_takeover.c
ctdb/server/ctdb_traverse.c
ctdb/server/ctdb_update_record.c
ctdb/server/ctdb_vacuum.c
ctdb/server/eventscript.c
ctdb/tests/src/ctdb_test.c
ctdb/tests/src/ctdbd_test.c