[ClusterLabs/libqb] aec4cd: Fix check_ipc tests so they exit correctly
by Chrissie Caulfield
Branch: refs/heads/master
Home: https://github.com/ClusterLabs/libqb
Commit: aec4cde4312ada559888371554b0ae862cf91b9a
https://github.com/ClusterLabs/libqb/commit/aec4cde4312ada559888371554b0a...
Author: Christine Caulfield <ccaulfie(a)redhat.com>
Date: 2015-09-11 (Fri, 11 Sep 2015)
Changed paths:
M tests/check_ipc.c
Log Message:
-----------
Fix check_ipc tests so they exit correctly
On some platforms the check_ipc test can fail due to SIGTERM
being delivered to to exiting server process. There is a race
condition between the server main loop quitting and the
signal being delivered.
This patch closes that race loophole in two places, firstly
it makes SIGTERM/SIGSTOP exit immediately rather than just signalling
the mainloop, secondly it calls exit() rather than return when the server
mainloop completes to that the client code does not start executing!
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
8 years, 7 months