Re: postmaster.pid

"Dave Page" <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <E7F85A1B5FF8D44C8A1AF6885BC9A0E41A7867@ratbert.vale-housing.co.uk>
 

> -----Original Message-----
> From: Andrew Dunstan [mailto:[email protected]] 
> Sent: 24 August 2004 15:06
> To: Dave Page
> Cc: Barry Lind; [email protected]; Max Dunn
> Subject: Re: [pgsql-hackers-win32] postmaster.pid
> 
> 
> 
> I think we're on the wrong track here. If there is a pid file 
> then the postmaster will try to see if the process is running 
> by calling
> kill(pid,0) - see backend/utils/init/miscinit.c.
> 
> However, on Windows we simulate kill(), and always return 
> EINVAL if the signal <= 0 (see port/kill.c). ISTM the correct 
> solution would be to implement the effect of kill(pid,0) in 
> port/kill.c, presumably by a call to some native Windows 
> function that gives you the process info for a given pid.

Hi Andrew,

I'm glad you spotted that - I was just about to submit a patch that used
kill(pid, 0)!! My code is now submitted in a slightly different form
which will hopefully help sort this problem, however I have an hour or
so now so I'll take a quick look at the kill() issue.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org
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.