このページを編集する際は、編集に関する方針に従ってください。

概要

引数

実装

postgresql-8.1.4/src/backend/storage/ipc/ipc.c

void
proc_exit(int code)
{
	/*
	 * Once we set this flag, we are committed to exit.  Any ereport() will
	 * NOT send control back to the main loop, but right back here.
	 */
	proc_exit_inprogress = true;
	/*
	 * Forget any pending cancel or die requests; we're doing our best to
	 * close up shop already.  Note that the signal handlers will not set
	 * these flags again, now that proc_exit_inprogress is set.
	 */
	InterruptPending = false;
	ProcDiePending = false;
	QueryCancelPending = false;
	/* And let's just make *sure* we're not interrupted ... */
	ImmediateInterruptOK = false;
	InterruptHoldoffCount = 1;
	CritSectionCount = 0;
	elog(DEBUG3, "proc_exit(%d)", code);
	/* do our shared memory exits first */
	shmem_exit(code);
	/*
	 * call all the callbacks registered before calling exit().
	 *
	 * Note that since we decrement on_proc_exit_index each time, if a
	 * callback calls ereport(ERROR) or ereport(FATAL) then it won't be
	 * invoked again when control comes back here (nor will the
	 * previously-completed callbacks).  So, an infinite loop should not be
	 * possible.
	 */
	while (--on_proc_exit_index >= 0)
		(*on_proc_exit_list[on_proc_exit_index].function) (code,
								  on_proc_exit_list[on_proc_exit_index].arg);
	elog(DEBUG3, "exit(%d)", code);
	exit(code);
}

postgresql-8.1.4/src/backend/port/ipc_test.c

void
proc_exit(int code)
{
	shmem_exit(code);
	while (--on_proc_exit_index >= 0)
		(*on_proc_exit_list[on_proc_exit_index].function) (code,
								  on_proc_exit_list[on_proc_exit_index].arg);
	exit(code);
}

呼出元

備考

履歴

コメント



*1 99333685+99333685
*2 99333685+99333685

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS