diff options
author | Bruce Momjian <bruce@momjian.us> | 1999-11-06 19:46:57 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1999-11-06 19:46:57 +0000 |
commit | df723a8a8aa3326d2ade8ad846a296e2e2500a64 (patch) | |
tree | b86e6f819be15c4f8d1627304ca6e5b2d7bd1fae /src | |
parent | 17d819c0939cf1422a913388f6066f3a72f6159a (diff) | |
download | postgresql-df723a8a8aa3326d2ade8ad846a296e2e2500a64.tar.gz postgresql-df723a8a8aa3326d2ade8ad846a296e2e2500a64.zip |
exit recursion fix from Massimo
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/storage/ipc/ipc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c index 2c10a8c5a5e..eca74905b2c 100644 --- a/src/backend/storage/ipc/ipc.c +++ b/src/backend/storage/ipc/ipc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.41 1999/11/06 17:01:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.42 1999/11/06 19:46:57 momjian Exp $ * * NOTES * @@ -118,18 +118,19 @@ proc_exit(int code) * If proc_exit is called too many times something bad is happening, so * exit immediately. This is crafted in two if's for a reason. */ - if (proc_exit_inprogress == 9) + + if (++proc_exit_inprogress == 9) elog(ERROR, "infinite recursion in proc_exit"); if (proc_exit_inprogress >= 9) goto exit; /* ---------------- - * if proc_exit_inprocess is true, then it means that we + * if proc_exit_inprocess > 1, then it means that we * are being invoked from within an on_exit() handler * and so we return immediately to avoid recursion. * ---------------- */ - if (proc_exit_inprogress++) + if (proc_exit_inprogress > 1) return; /* do our shared memory exits first */ |