1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Remove fork()/exec() and only do fork(). Small cleanups.

This commit is contained in:
Bruce Momjian
1998-05-29 17:00:34 +00:00
parent 2d4c6cab96
commit 212c905e2c
19 changed files with 172 additions and 144 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.20 1998/03/02 05:41:55 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.21 1998/05/29 17:00:10 momjian Exp $
*
* NOTES
*
@@ -137,7 +137,6 @@ exitpg(int code)
for (i = onexit_index - 1; i >= 0; --i)
(*onexit_list[i].function) (code, onexit_list[i].arg);
StreamDoUnlink();
exit(code);
}
@@ -168,7 +167,9 @@ quasi_exitpg()
* ----------------
*/
for (i = onexit_index - 1; i >= 0; --i)
(*onexit_list[i].function) (0, onexit_list[i].arg);
/* Don't do StreamDoUnlink on quasi_exit */
if (onexit_list[i].function != StreamDoUnlink)
(*onexit_list[i].function) (0, onexit_list[i].arg);
onexit_index = 0;
exitpg_inprogress = 0;
@@ -182,7 +183,7 @@ quasi_exitpg()
* ----------------------------------------------------------------
*/
int
on_exitpg(void (*function) (), caddr_t arg)
on_exitpg(void (*function) (), caddr_t arg)
{
if (onexit_index >= MAX_ON_EXITS)
return (-1);
@@ -195,6 +196,18 @@ int
return (0);
}
/* ----------------------------------------------------------------
* clear_exitpg
*
* this function clears all exitpg() registered functions.
* ----------------------------------------------------------------
*/
void
clear_exitpg(void)
{
onexit_index = 0;
}
/****************************************************************************/
/* IPCPrivateSemaphoreKill(status, semId) */
/* */

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.7 1997/09/08 02:28:48 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.8 1998/05/29 17:00:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -101,7 +101,7 @@ CreateSharedMemoryAndSemaphores(IPCKey key)
* ----------------
*/
InitProcGlobal(key);
on_exitpg(ProcFreeAllSemaphores, 0);
on_exitpg(ProcFreeAllSemaphores, NULL);
CreateSharedInvalidationState(key);
}