From 315bcb72c98681b1f484f55a050424470ed8ccfa Mon Sep 17 00:00:00 2001 From: "roberto@precise64" Date: Wed, 11 Apr 2012 07:23:00 +0200 Subject: [PATCH] applied nagios patch from github --- plugins/nagios/nagios.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/nagios/nagios.c b/plugins/nagios/nagios.c index 4d22e869..77fc34e6 100644 --- a/plugins/nagios/nagios.c +++ b/plugins/nagios/nagios.c @@ -28,7 +28,10 @@ int nagios() { int fd = uwsgi_connect(uwsgi.sockets->name, uwsgi.shared->options[UWSGI_OPTION_SOCKET_TIMEOUT], 0); if (fd < 0) { - fprintf(stdout, "UWSGI CRITICAL: could not connect() to workers\n"); + fprintf(stdout, "UWSGI CRITICAL: could not connect() to workers %s\n", strerror(errno)); + if (errno == EPERM || errno == EACCES) { + exit(3); + } exit(2); }