Re: statistics process shutting down

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: statistics process shutting down
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3412A7547@Herge.rcsinc.local
обсуждение исходный текст
Ответ на statistics process shutting down  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Ответы Re: statistics process shutting down  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: statistics process shutting down  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers-win32
> > Maybe Magnus might comment here.  This doesn't explain why the read
call
> > is failing but I'm pretty sure the error code is not being properly
> > returned.
>
> I recall a lot of angst about whether the encoding of
WSAGetLastError()
> is compatible with errno values, but I forget what the conclusion was.
> Can we just assign to errno like that, or do we need a mapping
function?

Ah.  My bad.
/backend/prot/win32/socket.c

static void
TranslateSocketError(void) etc.  This puts the value in errno like it is
suppoed to be.  MS recv() does not (I checked) so this is definately a
bug in pipe.c, since it is reasonable for the caller to expect errno to
be set to something.

Also, recv() and read() return completely different error codes :-).  So
any caller has to be careful not to make assumptions about errno.

Merlin

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: statistics process shutting down
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: statistics process shutting down