Просмотр исходного кода

Merge branch 'maint' of github.com:nagios-plugins/nagios-plugins into maint

Bryan Heden 7 лет назад
Родитель
Сommit
d6575b17fc
2 измененных файлов с 7 добавлено и 2 удалено
  1. 5 0
      plugins/common.h
  2. 2 2
      plugins/popen.c

+ 5 - 0
plugins/common.h

@@ -174,6 +174,11 @@
 #  endif
 #endif
 
+/* MariaDB 10.2 client does not set MYSQL_PORT */
+#ifndef MYSQL_PORT
+#  define MYSQL_PORT 3306
+#endif
+
 /*
  *
  * Standard Values

+ 2 - 2
plugins/popen.c

@@ -305,10 +305,10 @@ popen_timeout_alarm_handler (int signo)
 			}
 			/* printf (_("CRITICAL - Plugin timed out after %d seconds\n"),
 						timeout_interval); */
-			write(STDOUT_FILENO, msg1, sizeof(msg1));
+			write(STDOUT_FILENO, msg1, sizeof(msg1) - 1);
 		} else {
 			/* printf ("%s\n", _("CRITICAL - popen timeout received, but no child process")); */
-			write(STDOUT_FILENO, msg2, sizeof(msg2));
+			write(STDOUT_FILENO, msg2, sizeof(msg2) - 1);
 		}
 		exit (STATE_CRITICAL);
 	}