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

(oop_sys_run): Clamp the value of the tv_sec field of the select

	timeout argument to 3600 seconds, to check if very large values
	is the reason that FreeBSD returns EINVAL here.  (Bug 1065).
parent beb65abc
...@@ -344,7 +344,13 @@ void *oop_sys_run(oop_source_sys *sys) { ...@@ -344,7 +344,13 @@ void *oop_sys_run(oop_source_sys *sys) {
} }
assert(ptv == NULL assert(ptv == NULL
|| (ptv->tv_usec >= 0 && ptv->tv_usec < 1000000)); || (ptv->tv_usec >= 0 && ptv->tv_usec < 1000000
&& ptv->tv_sec >= 0));
/* FIXME (bug 1065): FreeBSD seems to have problem
with too large tv_sec values. It returns EINVAL.
Does this fix the problem? */
if (ptv != NULL && ptv->tv_sec > 3600)
prv->tv_sec = 3600;
do do
{ {
assert(ptv == NULL assert(ptv == NULL
......
Markdown is supported
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