Re: FW: Win32 fix for miscinit.c

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: FW: Win32 fix for miscinit.c
Date: 2004-10-04 14:58:24
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE475E03@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

> >> Tom's recent patch to improve stale lockfile detection included a
> >> call to getppid() which doesn't exist on Windows.
> >> There is no clean way to implement one (previously discussed on
> >> hackers-win32) hence the attach patch simply #ifdefs out the call.
>
> Done. I think this is no real problem for Windows, since its
> implementation of the kill(pid,0) check is not going to be
> fooled by parent processes anyway.

Correct. It will only catch an actual postgresql process.

Also, the logic was broken anyway since win32 assigns PIDs in a random
order and not sequential.. The probability you will get the same PID
after reboot is *very* low.

//mha

Browse pgsql-patches by date

  From Date Subject
Next Message Marc G. Fournier 2004-10-04 15:10:33 Re: license cleanup
Previous Message Tom Lane 2004-10-04 14:56:26 Re: FW: Win32 fix for miscinit.c