|
7 | 7 | * |
8 | 8 | * |
9 | 9 | * IDENTIFICATION |
10 | | - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.41 1999/11/0617:01:28 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.42 1999/11/0619:46:57 momjian Exp $ |
11 | 11 | * |
12 | 12 | * NOTES |
13 | 13 | * |
@@ -118,18 +118,19 @@ proc_exit(int code) |
118 | 118 | * If proc_exit is called too many times something bad is happening, so |
119 | 119 | * exit immediately. This is crafted in two if's for a reason. |
120 | 120 | */ |
121 | | -if (proc_exit_inprogress==9) |
| 121 | + |
| 122 | +if (++proc_exit_inprogress==9) |
122 | 123 | elog(ERROR,"infinite recursion in proc_exit"); |
123 | 124 | if (proc_exit_inprogress >=9) |
124 | 125 | gotoexit; |
125 | 126 |
|
126 | 127 | /* ---------------- |
127 | | - *if proc_exit_inprocessis true, then it means that we |
| 128 | + *if proc_exit_inprocess> 1, then it means that we |
128 | 129 | *are being invoked from within an on_exit() handler |
129 | 130 | *and so we return immediately to avoid recursion. |
130 | 131 | * ---------------- |
131 | 132 | */ |
132 | | -if (proc_exit_inprogress++) |
| 133 | +if (proc_exit_inprogress>1) |
133 | 134 | return; |
134 | 135 |
|
135 | 136 | /* do our shared memory exits first */ |
|