From 40646bea7c7d685bd642a07e7169c96c97500c02 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 30 Apr 2013 20:37:56 -0400 Subject: [PATCH] stapdyn: add a one-second timeout to the mutatee state-change ppoll Intermittently, the filehandle-based notification hangs (with rawhide dyninst 8.1.1 x86-64), but subsequent event polling works. So let's not let stapdyn block indefinitely on the former. * stapdyn/mutator.cxx (mutator::run): Add a 10-second timeout. --- stapdyn/mutator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stapdyn/mutator.cxx b/stapdyn/mutator.cxx index d3a600331..2265cf8ff 100644 --- a/stapdyn/mutator.cxx +++ b/stapdyn/mutator.cxx @@ -482,7 +482,9 @@ mutator::run () pfd.events = POLLIN; pfd.revents = 0; - int rc = ppoll (&pfd, 1, NULL, &masked.old); + struct timespec timeout = { 10, 0 }; + + int rc = ppoll (&pfd, 1, &timeout, &masked.old); if (rc < 0 && errno != EINTR) break; -- 2.43.5