The sleep(3) call can return the number of seconds left to sleep if
interrupted. Handle the intteruption in the health stall test.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
const char *var = "LTTNG_THREAD_MANAGE_CLIENTS_STALL";
if (check_env_var(var)) {
const char *var = "LTTNG_THREAD_MANAGE_CLIENTS_STALL";
if (check_env_var(var)) {
+ unsigned int sleep_time = STALL_TIME;
+ while (sleep_time > 0) {
+ sleep_time = sleep(sleep_time);
+ }
const char *var = "LTTNG_THREAD_MANAGE_KERNEL_STALL";
if (check_env_var(var)) {
const char *var = "LTTNG_THREAD_MANAGE_KERNEL_STALL";
if (check_env_var(var)) {
+ unsigned int sleep_time = STALL_TIME;
+ while (sleep_time > 0) {
+ sleep_time = sleep(sleep_time);
+ }
const char *var = "LTTNG_THREAD_MANAGE_APPS_STALL";
if (check_env_var(var)) {
const char *var = "LTTNG_THREAD_MANAGE_APPS_STALL";
if (check_env_var(var)) {
+ unsigned int sleep_time = STALL_TIME;
+ while (sleep_time > 0) {
+ sleep_time = sleep(sleep_time);
+ }