Skip to content
Snippets Groups Projects
Commit 1c2f100d authored by Per Cederqvist's avatar Per Cederqvist Committed by Magnus Holmgren
Browse files

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

	still returns EINVAL sometimes.

Signed-off-by: default avatarMagnus Holmgren <magnus@kibibyte.se>
parent 8669e095
Branches
Tags
No related merge requests found
...@@ -337,6 +337,8 @@ void *oop_sys_run_once(oop_source_sys *sys) { ...@@ -337,6 +337,8 @@ void *oop_sys_run_once(oop_source_sys *sys) {
tv.tv_sec = 0; tv.tv_sec = 0;
tv.tv_usec = 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); if (!sys->sig_active) sys->do_jmp = !sigsetjmp(sys->env,1);
...@@ -364,7 +366,13 @@ void *oop_sys_run_once(oop_source_sys *sys) { ...@@ -364,7 +366,13 @@ void *oop_sys_run_once(oop_source_sys *sys) {
if (NULL != sys->files[i][OOP_EXCEPTION].f) FD_SET(i,&xfd); if (NULL != sys->files[i][OOP_EXCEPTION].f) FD_SET(i,&xfd);
} }
assert(ptv == NULL
|| (ptv->tv_usec >= 0 && ptv->tv_usec < 1000000));
do 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); rv = select(sys->num_files,&rfd,&wfd,&xfd,ptv);
while (0 > rv && EINTR == errno); while (0 > rv && EINTR == errno);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment