Re: Latch implementation that wakes on postmaster death on both win32 and Unix - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Latch implementation that wakes on postmaster death on both win32 and Unix
Date
Msg-id 4DFA21AA.70002@enterprisedb.com
Whole thread Raw
In response to Re: Latch implementation that wakes on postmaster death on both win32 and Unix  (Peter Geoghegan <peter@2ndquadrant.com>)
Responses Re: Latch implementation that wakes on postmaster death on both win32 and Unix
List pgsql-hackers
This patch breaks silent_mode=on. In silent_mode, postmaster forks early 
on, to detach from the controlling tty. It uses fork_process() for that, 
which with patch closes the write end of the postmaster-alive pipe, but 
that's wrong because the child becomes the postmaster process.

On a stylistic note, the "extern" declaration in unix_latch.c is ugly, 
extern declarations should be in header files. Come to think of it, I 
feel the Init- and ReleasePostmasterDeathWatchHandle() functions should 
go to postmaster.c. postmaster_alive_fds[] and PostmasterHandle serve 
the same purpose, declaration and initialization of both should be kept 
together, perhaps by moving the initialization of PostmasterHandle into 
Init- and ReleasePostmasterDeathWatchHandle().

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Radosław Smogura
Date:
Subject: [WIP] [Stream] Preview of pg_type changes
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: procpid?