[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apparantly konsole is unusable

On 2010-08-08, Nicolas Barbier <nicolas.barbier@gmail.com> wrote:
> 2010/8/8 Sune Vuorela <nospam@vuorela.dk>:
>> 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.

  if (openpty( &d->masterFd, &d->slaveFd, ptsn, NULL, NULL))
     int errsv = errno;
     if(errsv == EINTR) {
       goto tryagain;


Reply to: