This is a multi-part message in MIME format.
--------------040807040700010905080200
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hi,
I just upgraded from 2.8 to 2.9 on Solaris 10 and gcc 4.1.2.
I noticed that if I send a reload (SIGHUP) to the 2.9, Nagios gets always SIGEXIT. With 2.8 Nagios
gets the right value.
I performed some tests, and finally moving the definition of sigs[x] from base/nagios.c to
base/utils.c solve this problem. I don't know why, and I don't know if it's a Solaris or GCC problem.
Attached there is the patch.
Andrea
--
---------------------------------------
A user friendly computer first requires a friendly user.
---------------------------------------
Ing. Andrea Gabellini
Email: [email protected]
Tel: 0549 886111 (Italy)
Tel. +378 0549 886111 (International)
Telecom Italia San Marino S.p.A.
Strada degli Angariari, 3
47891 Rovereta
Republic of San Marino
http://www.omniway.sm http://www.telecomitalia.sm
--------------040807040700010905080200
Content-Type: text/plain;
name="nagios-2.9.patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nagios-2.9.patch.txt"
--- base/nagios.c.orig 2007-04-17 10:52:43.370390000 +0200
+++ base/nagios.c 2007-04-17 10:56:46.452195000 +0200
@@ -142,7 +142,7 @@
int sigshutdown=FALSE;
int sigrestart=FALSE;
-char *sigs[]={"EXIT","HUP","INT","QUIT","ILL","TRAP","ABRT","BUS","FPE","KILL","USR1","SEGV","USR2","PIPE","ALRM","TERM","STKFLT","CHLD","CONT","STOP","TSTP","TTIN","TTOU","URG","XCPU","XFSZ","VTALRM","PROF","WINCH","IO","PWR","UNUSED","ZERR","DEBUG",(char *)NULL};
+extern char **sigs;
int caught_signal=FALSE;
int sig_id=0;
--- base/utils.c.orig 2007-04-17 10:52:34.218343000 +0200
+++ base/utils.c 2007-04-17 10:58:40.339805000 +0200
@@ -76,7 +76,7 @@
extern int sigshutdown;
extern int sigrestart;
-extern char **sigs;
+char *sigs[]={"EXIT","HUP","INT","QUIT","ILL","TRAP","ABRT","BUS","FPE","KILL","USR1","SEGV","USR2","PIPE","ALRM","TERM","STKFLT","CHLD","CONT","STOP","TSTP","TTIN","TTOU","URG","XCPU","XFSZ","VTALRM","PROF","WINCH","IO","PWR","UNUSED","ZERR","DEBUG",(char *)NULL};
extern int caught_signal;
extern int sig_id;
--------------040807040700010905080200--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]