Re: windows doesn't notice backend death - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: windows doesn't notice backend death
Date
Msg-id 49FEAF5F.6000909@hagander.net
Whole thread Raw
In response to Re: windows doesn't notice backend death  (Andrew Dunstan <andrew@dunslane.net>)
List 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 by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: windows doesn't notice backend death
Next
From: Magnus Hagander
Date:
Subject: Re: windows doesn't notice backend death