When an exception occurs in the main loop, longjmp() gets called and
the variable "first" restored to the initial value. This make the
pgpool start message printed multiple times. This is harmless but
confusing. To fix that, add "volatile" qualifier so that the variable
is on the stack, rather than on a register.
Fix suggested by Muhammad Usama.
sigjmp_buf local_sigjmp_buf;
- bool first = true;
+ /*
+ * to prevent the variable set on a register so that longjmp() does not
+ * discard the content
+ */
+ volatile bool first = true;
/* For PostmasterRandom */
gettimeofday(&random_start_time, NULL);