Re: Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection
Дата
Msg-id 15044.1386255278@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection  (Alexander Kukushkin <cyberdemn@gmail.com>)
Ответы Re: Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection  (Alexander Kukushkin <cyberdemn@gmail.com>)
Список pgsql-bugs
Alexander Kukushkin <cyberdemn@gmail.com> writes:
> After analysing source code of postgres and openssl I've found (at least I
> think) the reason why it is happening:
>
----------------------------------------------------------------------------------------------------------------------------
> static int
> my_sock_write(BIO *h, const char *buf, int size)
> {
>         int                     res = 0;

>         res = send(h->num, buf, size, 0);
>         if (res <= 0)
>         {
>                 if (errno == EINTR)
>                 {
>                         BIO_set_retry_write(h);
>                 }
>         }

>         return res;
> }

BTW, I was looking at that function the other day and thinking it was
wrong: if the send() returns exactly zero, it hasn't set errno has it?
But perhaps that case never arises.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alexander Kukushkin
Дата:
Сообщение: Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection
Следующее
От: Alexander Kukushkin
Дата:
Сообщение: Re: Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection