Re: windows doesn't notice backend death

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: windows doesn't notice backend death
Дата
Msg-id 49FEAF5F.6000909@hagander.net
обсуждение исходный текст
Ответ на Re: windows doesn't notice backend death  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan wrote:
> 
> 
> justin wrote:
>> Tom Lane wrote:
>>>   Have M$ really been stupid
>>> enough to make an external kill look just like an exit() call?
>>>
>>>             regards, tom lane
>>>
>>>   
>> kind of :-(
>>
>>
>>
>> Would it not be easy to set the normal exitcode to something other
>> than 1 to see the difference
>> ExitProcess()
>>
> 
> Not really, as Tom showed later this is an example of a more general
> problem. I think his solution of detecting when backends have cleaned up
> nicely and when they have not is the right way to go.

Well, if we picked a different value than 1, the probability would
certainly go up that things work. I bet most external libs that do such
an evil thing would be doing exit(1). If we picked a return code way up
in the space (say something well above 2^16), the likelihood that a lib
would be using exactly that one decreases drastically. But there's no
guarantee - so it'd just be a "better workaround".

//Magnus



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: windows doesn't notice backend death
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: windows doesn't notice backend death