Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Win32 question: getppid() with no parent?


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: pgsql-hackers-win32(at)postgresql(dot)org
  • Subject: Win32 question: getppid() with no parent?
  • Date: Thu, 27 May 2004 13:40:40 -0400
  • Message-id: <9939(dot)1085679640(at)sss(dot)pgh(dot)pa(dot)us>

On Unix, it is possible to tell whether your parent process has died
by checking to see if you have become a child of init:

	if (getppid() == 1)
	   /* oh dear, I am an orphan */

Is there equivalent functionality available on Windows?

Currently, we have the pgstat child process checking for postmaster
death by watching for read-ready on a pipe.  This does not scale
pleasantly to multiple long-lived postmaster children, though, so
I'm wondering about ways for the children to detect a postmaster crash
without requiring any direct postmaster cooperation.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group