Commit e6aee9ea authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(oop_sys_run): Added a few assertions to try to figure out why select

	still returns EINVAL sometimes.
parent f53e94e6
......@@ -322,6 +322,8 @@ void *oop_sys_run(oop_source_sys *sys) {
tv.tv_sec = 0;
tv.tv_usec = 0;
}
assert(tv.tv_usec >= 0);
assert(tv.tv_usec < 1000000);
}
if (!sys->sig_active) sys->do_jmp = !sigsetjmp(sys->env,1);
......@@ -341,8 +343,16 @@ void *oop_sys_run(oop_source_sys *sys) {
if (NULL != sys->files[i][OOP_EXCEPTION].f) FD_SET(i,&xfd);
}
assert(ptv == NULL
|| (ptv->tv_usec >= 0 && ptv->tv_usec < 1000000));
do
{
assert(ptv == NULL
|| (ptv->tv_usec >= 0
&& ptv->tv_usec < 1000000));
assert(sys->num_files >= 0);
rv = select(sys->num_files,&rfd,&wfd,&xfd,ptv);
}
while (0 > rv && EINTR == errno);
sys->do_jmp = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment