On 2010-08-08, Nicolas Barbier <[email protected]> wrote:
> 2010/8/8 Sune Vuorela <[email protected]>:
>
>> in libkpty (kde4libs/kpty/kpty.c), there is a call to openpty:
>> (this is compiled with g++)
>>
>> ::openpty( &d->masterFd, &d->slaveFd, ptsn, 0, 0)
>>
>> (d is a pointer to a struct, d->masterFd is a int, d->slaveFd is a
>> int, ptsn is a char pointer)
>>
>> which fails with EINTR (according to errno)
>
> [..]
>
>> I'm out of clue and/or inspiration.
>
> My possibly-clueless 2¢: If EINTR is returned, the call should be
> retried, which this code doesn't seem to do.
I tried with wrapping it in a bit of goto magic, and I just got a loop
that seemed infinite. I stopped it after ~50 tries.
tryagain:
if (openpty( &d->masterFd, &d->slaveFd, ptsn, NULL, NULL))
{
int errsv = errno;
perror(__PRETTY_FUNCTION__);
if(errsv == EINTR) {
sleep(1);
goto tryagain;
}
[....]
/Sune
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]