mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Add SLEEP_ON_ABORT
This commit is contained in:
parent
a4834243ad
commit
7ebae4c096
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.8 1998/06/18 16:32:51 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.9 1998/06/18 16:35:38 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTE
|
* NOTE
|
||||||
* This should eventually work with elog(), dlog(), etc.
|
* This should eventually work with elog(), dlog(), etc.
|
||||||
@ -15,6 +15,7 @@
|
|||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "postgres.h" /* where the declaration goes */
|
#include "postgres.h" /* where the declaration goes */
|
||||||
#include "utils/module.h"
|
#include "utils/module.h"
|
||||||
@ -54,9 +55,11 @@ ExceptionalCondition(char *conditionName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ABORT_ON_ASSERT
|
#ifdef ABORT_ON_ASSERT
|
||||||
sleep(99999);
|
|
||||||
abort();
|
abort();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SLEEP_ON_ASSERT
|
||||||
|
sleep(1000000);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX Depending on the Exception and tracing conditions, you will XXX
|
* XXX Depending on the Exception and tracing conditions, you will XXX
|
||||||
|
Loading…
Reference in New Issue
Block a user