1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Fix for hang after postmaster restart. Add new proc_exit and

shmem_exit to replace exitpg().
This commit is contained in:
Bruce Momjian
1998-06-27 04:53:49 +00:00
parent 8fa93b016a
commit e747c58718
18 changed files with 130 additions and 123 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.29 1998/06/15 19:29:41 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.30 1998/06/27 04:53:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -142,7 +142,7 @@ elog(int lev, const char *fmt,...)
write(open("/dev/console", O_WRONLY, 0666), line, len);
fflush(stdout);
fflush(stderr);
exitpg(lev);
proc_exit(lev);
}
fsync(Err_file);
}
@@ -201,14 +201,14 @@ elog(int lev, const char *fmt,...)
fflush(stderr);
ProcReleaseSpins(NULL); /* get rid of spinlocks we hold */
ProcReleaseLocks(); /* get rid of real locks we hold */
exitpg(0);
proc_exit(0);
}
if (lev > FATAL)
{
fflush(stdout);
fflush(stderr);
exitpg(lev);
proc_exit(lev);
}
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.20 1998/02/26 04:37:35 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.21 1998/06/27 04:53:45 momjian Exp $
*
* NOTE
* XXX this code needs improvement--check for state violations and
@@ -78,7 +78,7 @@ EnableExceptionHandling(bool on)
if (on == ExceptionHandlingEnabled)
{
/* XXX add logging of failed state */
exitpg(255);
proc_exit(255);
/* ExitPostgres(FatalExitStatus); */
}