[PATCH] sync: Avoid ridiculously long timeouts
Mark Kettenis
mark.kettenis at xs4all.nl
Sun Dec 15 23:58:05 PST 2013
> Date: Mon, 16 Dec 2013 10:25:43 +1000
> From: Peter Hutterer <peter.hutterer at who-t.net>
>
> On Sun, Dec 15, 2013 at 02:31:10PM +0100, Mark Kettenis wrote:
> > From: Mark Kettenis <kettenis at openbsd.org>
> >
> > On OpenBSD, passing a timeout longer than 100000000 seconds to select(2) will
> > make it fail with EINVAL. As this is original 4.4BSD behaviour it is not
> > inconceivable that other systems suffer from the same problem. And Linux,
> > though not suffering from any 4.4BSD heritage, briefly did something similar:
> >
> > <https://lkml.org/lkml/2012/8/31/263>
> >
> > So avoid calling AdjustWaitForDelay() instead of setting the timeout to
> > (effectively) ULONG_MAX milliseconds.
> >
> > Signed-off-by: Mark Kettenis <kettenis at openbsd.org>
>
> you may want to review the synaptics driver for this as well, iirc it also
> uses huge delays.
The synaptic driver was the first place I looked ;). Its timeouts are
indeed large but still small enough to be accepted by select(2).
Thanks,
Mark
More information about the xorg-devel
mailing list