--- libaitsched/src/aitsched.c 2023/02/25 15:55:01 1.31 +++ libaitsched/src/aitsched.c 2023/02/27 01:25:07 1.31.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsched.c,v 1.31 2023/02/25 15:55:01 misho Exp $ +* $Id: aitsched.c,v 1.31.2.1 2023/02/27 01:25:07 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -1181,6 +1181,7 @@ int schedSignalDispatch(sched_root_task_t * __restrict root, int on) { sigset_t ss; + struct timespec ts = { .tv_sec = 1, .tv_nsec = 0 }; #ifndef HAVE_LIBPTHREAD sched_SetErr(ENOTSUP, "Library has not support pthreads"); return -1; @@ -1204,6 +1205,10 @@ schedSignalDispatch(sched_root_task_t * __restrict roo pthread_mutex_unlock(&root->root_sigmtx); return 0; } + + /* if we have not using polling, then we must turn on */ + if (sched_timespecisinf(&root->root_poll)) + schedPolling(root, &ts, NULL); pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);