Re: windows doesn't notice backend death

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: justin <justin(at)emproshunts(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: windows doesn't notice backend death
Date: 2009-05-04 09:03:27
Message-ID: 49FEAF5F.6000909@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-05-04 09:11:03 Re: windows doesn't notice backend death
Previous Message Magnus Hagander 2009-05-04 08:59:50 Re: windows doesn't notice backend death