[monit-dev] [monit] r336 committed - AIX: Fix the M/Monit heartbeat. Thanks to Helen Chen for report....
Author: [hidden email] Date: Tue Mar 8 01:09:16 2011
Log: AIX: Fix the M/Monit heartbeat. Thanks to Helen Chen for report.
On AIX the pthread.h has to be included as first file or -D_THREAD_SAFE
must be used, otherwise the socket interface
becomes crazy when used from non-main thread. Since we use standalone
thread for heartbeat (status messages)
to make the heartbeat keep up with deadline and make it non-blocking, the
status messages didn't worked - the socket interface
returned usually bunch of random irational errors and only sporadically
succeeded. The -D_THREAD_SAFE solves the problem.
--- /trunk/CHANGES.txt Mon Mar 7 00:29:06 2011
+++ /trunk/CHANGES.txt Tue Mar 8 01:09:16 2011
@@ -18,6 +18,8 @@
* AIX: Fix the time display which was off by GMT difference. Thanks to
Helen Chen for report.
+* AIX: Fix the M/Monit heartbeat. Thanks to Helen Chen for report.
--- /trunk/configure.ac Mon Feb 28 08:00:47 2011
+++ /trunk/configure.ac Tue Mar 8 01:09:16 2011
@@ -432,7 +432,7 @@
elif test `uname` = "AIX"
- CFLAGS="$CFLAGS -D _REENTRANT"
+ CFLAGS="$CFLAGS -D_THREAD_SAFE -D_REENTRANT"
# AIX v. 5.2