From 7ebae4c0967af98266493f6b487fb0fb7dcd35b8 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Thu, 18 Jun 1998 16:35:38 +0000
Subject: [PATCH] Add SLEEP_ON_ABORT

---
 src/backend/utils/error/assert.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/backend/utils/error/assert.c b/src/backend/utils/error/assert.c
index c33b13d7091..60b913474dd 100644
--- a/src/backend/utils/error/assert.c
+++ b/src/backend/utils/error/assert.c
@@ -7,7 +7,7 @@
  *
  *
  * 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
  *	  This should eventually work with elog(), dlog(), etc.
@@ -15,6 +15,7 @@
  *-------------------------------------------------------------------------
  */
 #include <stdio.h>
+#include <unistd.h>
 
 #include "postgres.h"			/* where the declaration goes */
 #include "utils/module.h"
@@ -54,9 +55,11 @@ ExceptionalCondition(char *conditionName,
 	}
 
 #ifdef ABORT_ON_ASSERT
-	sleep(99999);
 	abort();
 #endif
+#ifdef SLEEP_ON_ASSERT
+	sleep(1000000);
+#endif
 
 	/*
 	 * XXX Depending on the Exception and tracing conditions, you will XXX
-- 
GitLab