Re: AW: [Nagios-devel] Nagios 2.0b4 restart issue
Posted: Tue Nov 29, 2005 2:53 am
Andreas Ericsson wrote:
> No it's not. Multiple instances has absolutely nothing to do with what
> the shell returns when asked to run a program. In this case, it does
>
> result = execve(argv[0], argv, envp);
> /* execve() only returns on errors, so hint what went wrong */
> exit (-errno);
>
> and since ENOENT == 2 this results in a return code of -127 on all
> architectures that implement the two-complement bit pattern.
>
Andreas, I'm getting away from the initial topic, but I've tryed the
following code:
#include
int main(int argc, char* argv[])
{
int dontcare = execv(argv[1], argv);
printf("Returning -(%d) to the shell\n", errno);
exit(-errno);
}
Then I called it with something stupid (e.g. ./a.out does-not-exist) and
echoed the $?, which happens to be 254. Seems to be something like
signed/unsigned issue.
Anyway this program returns 254 on my x86 box so the 127 value mentioned
in this thread might come from somewhere else.
As for Radkon's problem, I remember having had to kill -9 Nagios'
processes from time to time when checking/debuging the configuration and
NEB and playing too intensively with the [re]start/stop script -- but
this did not yield 127 errors.
Radkon, does the problem appear *only* when you restart nagios with the
init script ? Never when start/stop is used nor when launched from the
shell ?
--
Thibault GENESSAY
ALIADIS
www.aliadis.fr
Tel. 0870 723 724
Fax 04 72 13 90 40
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> No it's not. Multiple instances has absolutely nothing to do with what
> the shell returns when asked to run a program. In this case, it does
>
> result = execve(argv[0], argv, envp);
> /* execve() only returns on errors, so hint what went wrong */
> exit (-errno);
>
> and since ENOENT == 2 this results in a return code of -127 on all
> architectures that implement the two-complement bit pattern.
>
Andreas, I'm getting away from the initial topic, but I've tryed the
following code:
#include
int main(int argc, char* argv[])
{
int dontcare = execv(argv[1], argv);
printf("Returning -(%d) to the shell\n", errno);
exit(-errno);
}
Then I called it with something stupid (e.g. ./a.out does-not-exist) and
echoed the $?, which happens to be 254. Seems to be something like
signed/unsigned issue.
Anyway this program returns 254 on my x86 box so the 127 value mentioned
in this thread might come from somewhere else.
As for Radkon's problem, I remember having had to kill -9 Nagios'
processes from time to time when checking/debuging the configuration and
NEB and playing too intensively with the [re]start/stop script -- but
this did not yield 127 errors.
Radkon, does the problem appear *only* when you restart nagios with the
init script ? Never when start/stop is used nor when launched from the
shell ?
--
Thibault GENESSAY
ALIADIS
www.aliadis.fr
Tel. 0870 723 724
Fax 04 72 13 90 40
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]