--- libaitsched/src/hooks.c 2011/08/12 12:12:01 1.1.1.1.2.6 +++ libaitsched/src/hooks.c 2011/09/28 14:14:10 1.1.1.1.2.7 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: hooks.c,v 1.1.1.1.2.6 2011/08/12 12:12:01 misho Exp $ +* $Id: hooks.c,v 1.1.1.1.2.7 2011/09/28 14:14:10 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -309,7 +309,13 @@ retry: timeout = NULL; if ((en = kevent(r->root_kq, NULL, 0, res, KQ_EVENTS, timeout)) == -1) { LOGERR; +#ifdef NDEBUG + /* kevent no exit by error, if non-debug version */ goto retry; +#else + /* diagnostic exit from scheduler if kevent error occur */ + return NULL; +#endif } nw.tv_sec = nw.tv_nsec = 0;