* InitProcessPhase2 -- make MyProc visible in the shared ProcArray. * * This is separate from InitProcess because we can't acquire LWLocks until * we've created a PGPROC, but in the EXEC_BACKEND case ProcArrayAdd won't * work until after we've done CreateSharedMemoryAndSemaphores. */
| 633 | * work until after we've done CreateSharedMemoryAndSemaphores. |
| 634 | */ |
| 635 | void |
| 636 | InitProcessPhase2(void) |
| 637 | { |
| 638 | Assert(MyProc != NULL); |
| 639 | |
| 640 | /* |
| 641 | * Add our PGPROC to the PGPROC array in shared memory. |
| 642 | */ |
| 643 | ProcArrayAdd(MyProc); |
| 644 | |
| 645 | /* |
| 646 | * Arrange to clean that up at backend exit. |
| 647 | */ |
| 648 | on_shmem_exit(RemoveProcFromArray, 0); |
| 649 | } |
| 650 | |
| 651 | /* |
| 652 | * InitAuxiliaryProcess -- create a per-auxiliary-process data structure |
no test coverage detected