* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
+<<<<<<< HEAD
* Copyright (c) 2003-2010 PgPool Global Development Group
+=======
+ * Copyright (c) 2003-2012 PgPool Global Development Group
+>>>>>>> d2f39cc... Fix deadlock by enabling log_destination = syslog reported in bug
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
#else
int oldmask;
#endif
+ POOL_SETMASK2(&BlockSig, &oldmask);
+
/* Write error message to syslog */
if (pool_config->logsyslog == 1) {
va_start(ap, fmt);
vsyslog(pool_config->syslog_facility | LOG_ERR, fmt, ap);
va_end(ap);
+ POOL_SETMASK(&oldmask);
return;
}
- POOL_SETMASK2(&BlockSig, &oldmask);
-
if (pool_config->print_timestamp)
#ifdef HAVE_ASPRINTF
len = asprintf(&fmt2, "%s ERROR: pid %d: %s\n", nowsec(), (int)getpid(), fmt);
if (pool_config->debug_level <= 0)
return;
}
+
+ POOL_SETMASK2(&BlockSig, &oldmask);
+
/* Write debug message to syslog */
if (pool_config->logsyslog == 1) {
va_start(ap, fmt);
vsyslog(pool_config->syslog_facility | LOG_DEBUG, fmt, ap);
va_end(ap);
+ POOL_SETMASK(&oldmask);
return;
}
- POOL_SETMASK2(&BlockSig, &oldmask);
-
if (pool_config->print_timestamp)
#ifdef HAVE_ASPRINTF
len = asprintf(&fmt2, "%s DEBUG: pid %d: %s\n", nowsec(), (int)getpid(), fmt);
#else
int oldmask;
#endif
+
+ POOL_SETMASK2(&BlockSig, &oldmask);
+
/* Write log message to syslog */
if (pool_config->logsyslog == 1) {
va_start(ap, fmt);
vsyslog(pool_config->syslog_facility | LOG_NOTICE, fmt, ap);
va_end(ap);
+ POOL_SETMASK(&oldmask);
return;
}
- POOL_SETMASK2(&BlockSig, &oldmask);
-
if (pool_config->print_timestamp)
#ifdef HAVE_ASPRINTF
len = asprintf(&fmt2, "%s LOG: pid %d: %s\n", nowsec(), (int)getpid(), fmt);