--- libaitsched/src/hooks.c 2012/08/23 02:33:12 1.15 +++ libaitsched/src/hooks.c 2012/08/31 13:00:41 1.15.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: hooks.c,v 1.15 2012/08/23 02:33:12 misho Exp $ +* $Id: hooks.c,v 1.15.2.1 2012/08/31 13:00:41 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -239,8 +239,8 @@ sched_hook_thread(void *task, void *arg) sigfillset(&s); pthread_sigmask(SIG_BLOCK, &s, &o); - if (pthread_create(&tid, (pthread_attr_t*) arg, - (void *(*)(void*)) _sched_threadWrapper, t)) { + if ((errno = pthread_create(&tid, (pthread_attr_t*) arg, + (void *(*)(void*)) _sched_threadWrapper, t))) { LOGERR; pthread_sigmask(SIG_SETMASK, &o, NULL); return (void*) -1;