PG守护进程(Postmaster)——进程信号通信机制

	pqinitmask();
	PG_SETMASK(&BlockSig);
	pqsignal_pm(SIGHUP, SIGHUP_handler);	/* reread config file and have children do same */
	pqsignal_pm(SIGINT, pmdie); /* send SIGTERM and shut down */
	pqsignal_pm(SIGQUIT, pmdie);	/* send SIGQUIT and die */
	pqsignal_pm(SIGTERM, pmdie);	/* wait for children and shut down */
	pqsignal_pm(SIGALRM, SIG_IGN);	/* ignored */
	pqsignal_pm(SIGPIPE, SIG_IGN);	/* ignored */
	pqsignal_pm(SIGUSR1, sigusr1_handler);	/* message from child process */
	pqsignal_pm(SIGUSR2, dummy_handler);	/* unused, reserve for children */
	pqsignal_pm(SIGCHLD, reaper);	/* handle child termination */

posmaster主进程与后端进程信号通信机制

后端进程向posmaster主进程发信号机制
postmaster主进程处理后端进程信号 sigusr1_handler

postmaster主进程向后端进程发信号机制
后端进程处理postmaster主进程信号

判活机制

进程退出注册回调函数机制

上一篇:Android 多线程意义


下一篇:BUUCTF [护网杯 2018]easy_tornado