diff options
| author | Tom Lane | 1999-04-20 02:19:59 +0000 |
|---|---|---|
| committer | Tom Lane | 1999-04-20 02:19:59 +0000 |
| commit | 09c5e84072326c1774bef933c8712906b0f01f85 (patch) | |
| tree | ec9425c92fee8d4b87169a80fe4757f2c4a307be /src/include/tcop | |
| parent | d30e2ac306c26271474e1b96c087ff8e6d859ac2 (diff) | |
Change elog(ERROR) to get back to main loop via a plain sigsetjmp,
instead of doing a kill(self, SIGQUIT) and expecting the signal handler
to do it. Also, clean up inconsistent definitions of the sigjmp buffer
in the several files that already referenced it.
Diffstat (limited to 'src/include/tcop')
| -rw-r--r-- | src/include/tcop/tcopprot.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h index b9f033ad72e..96da4d56653 100644 --- a/src/include/tcop/tcopprot.h +++ b/src/include/tcop/tcopprot.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: tcopprot.h,v 1.17 1999/02/13 23:22:13 momjian Exp $ + * $Id: tcopprot.h,v 1.18 1999/04/20 02:19:55 tgl Exp $ * * OLD COMMENTS * This file was created so that other c files could get the two @@ -18,8 +18,26 @@ #ifndef TCOPPROT_H #define TCOPPROT_H -#include <executor/execdesc.h> -#include <parser/parse_node.h> +#include <setjmp.h> +#include "executor/execdesc.h" +#include "parser/parse_node.h" + +/* Autoconf's test for HAVE_SIGSETJMP fails on Linux 2.0.x because the test + * explicitly disallows sigsetjmp being a #define, which is how it + * is declared in Linux. So, to avoid compiler warnings about + * sigsetjmp() being redefined, let's not redefine unless necessary. + * - thomas 1997-12-27 + * Autoconf really ought to be brighter about macro-ized system functions... + * and this code really ought to be in config.h ... + */ + +#if !defined(HAVE_SIGSETJMP) && !defined(sigsetjmp) +#define sigjmp_buf jmp_buf +#define sigsetjmp(x,y) setjmp(x) +#define siglongjmp longjmp +#endif +extern DLLIMPORT sigjmp_buf Warn_restart; +extern bool InError; #ifndef BOOTSTRAP_INCLUDE extern List *pg_parse_and_plan(char *query_string, Oid *typev, int nargs, @@ -30,7 +48,7 @@ extern void pg_exec_query_acl_override(char *query_string); extern void pg_exec_query_dest(char *query_string, CommandDest dest, bool aclOverride); -#endif /* BOOTSTRAP_HEADER */ +#endif /* BOOTSTRAP_INCLUDE */ extern void handle_warn(SIGNAL_ARGS); extern void quickdie(SIGNAL_ARGS); @@ -42,4 +60,4 @@ extern int PostgresMain(int argc, char *argv[], extern void ResetUsage(void); extern void ShowUsage(void); -#endif /* tcopprotIncluded */ +#endif /* TCOPPROT_H */ |
