Qt patch: Redo select on EINTR "error" (QLocalSocket)
Johannes Sixt
j.sixt at viscovery.net
Mon Nov 10 07:37:12 GMT 2008
Thiago Macieira schrieb:
> Daniel Winter wrote:
>> Can someone please take a look at the patch ( I think it ?is not really
>> optimal as it is, but it fixes the issue with Soprano )? ?What needs to
>> be done to get it in the qt-copy patch set?
>
> This was already fixed for Qt 4.4.4. See Qt task 226687.
>
> Attaching the official patch instead. Feel free to add it to qt-copy.
>
>
+ do {
+ if (selectForRead)
+ retval = select(socketDescriptor + 1, &fds, 0, 0, timeout < 0
? 0 : &tv);
+ else
+ retval = select(socketDescriptor + 1, 0, &fds, 0, timeout < 0
? 0 : &tv);
+ } while (retval == -1 && errno == EINTR);
This seems to rely on that select() updates tv. Isn't this Linux-specific?
Shouldn't this (at least on other platforms) calculate the new tv value
from the elapsed time, like in Daniel's patch?
-- Hannes
More information about the kde-core-devel
mailing list