Re: postmaster.pid

Andrew Dunstan <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>

Joerg Hessdoerfer wrote:

>
>
>Well, wouldn't it be better then to do an OS-dependant check for a running 
>postmaster, which could use kill() on IMHO broken systems where it's not easy 
>to determine the processname for a PID, and more elaborate checking on 
>others. On Windows, there's OpenProcess et al, on Linux, one could resort 
>to /proc. I didn't develop on too many others, but there should be 
>possibilities for those, too.
>
>
>  
>

At this stage in the dev cycle I don't think so - might be worth 
improving the robustness post 8.0. Assuming you have access to /proc can 
be dangerous too - even if it's there (and in some jail/chroot type 
environments it isn't) .

One thought I did have was that it might be worth ignoring the .pid file 
is its mtime was older than the system boot time, assuming that both 
could be determined portably and reliably.

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.