mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 10:30:33 +03:00 
			
		
		
		
	Use signals for postmaster death on FreeBSD.
Use FreeBSD 11.2's new support for detecting parent process death to make PostmasterIsAlive() very cheap, as was done for Linux in an earlier commit. Author: Thomas Munro Discussion: https://postgr.es/m/7261eb39-0369-f2f4-1bb5-62f3b6083b5e@iki.fi
This commit is contained in:
		| @@ -379,6 +379,9 @@ PostmasterDeathSignalInit(void) | ||||
| #if defined(PR_SET_PDEATHSIG) | ||||
| 	if (prctl(PR_SET_PDEATHSIG, signum) < 0) | ||||
| 		elog(ERROR, "could not request parent death signal: %m"); | ||||
| #elif defined(PROC_PDEATHSIG_CTL) | ||||
| 	if (procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signum) < 0) | ||||
| 		elog(ERROR, "could not request parent death signal: %m"); | ||||
| #else | ||||
| #error "USE_POSTMASTER_DEATH_SIGNAL set, but there is no mechanism to request the signal" | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user