[CRIU] [PATCH] zdtm: check that pending signals are handled after resuming processes
Andrey Vagin
avagin at openvz.org
Fri Sep 20 12:28:19 EDT 2013
This patch detects the race, when a signal hanler could be executed
during restore.
More details are in: 5d18eca restorer: Block signals early
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
test/zdtm/live/static/sigpending.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/test/zdtm/live/static/sigpending.c b/test/zdtm/live/static/sigpending.c
index 05471f9..c52f44a 100644
--- a/test/zdtm/live/static/sigpending.c
+++ b/test/zdtm/live/static/sigpending.c
@@ -37,6 +37,11 @@ static void sig_handler(int signal, siginfo_t *info, void *data)
test_msg("signo=%d si_code=%x\n", signal, info->si_code);
+ if (test_go()) {
+ err("The signal is received before unlocking");
+ return;
+ }
+
switch (signal) {
case SIGCHLD:
if ((info->si_code & CLD_EXITED) &&
--
1.8.3.1
More information about the CRIU
mailing list