[PATCH] base/commands: Log what went wrong when cmd worker failed to launch

Andreas Ericsson ae at op5.se
Fri Nov 23 15:12:11 CET 2012


Applied. Thanks.

On 11/23/2012 03:09 PM, robin.sonefors at op5.com wrote:
> From: Robin Sonefors <robin.sonefors at op5.com>
> 
> The functionality to do so is right there, and the value of this
> information is relatively high, so please print it.
> 
> Signed-off-by: Robin Sonefors <robin.sonefors at op5.com>
> ---
>   base/commands.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/base/commands.c b/base/commands.c
> index b7b8ff4..7140283 100644
> --- a/base/commands.c
> +++ b/base/commands.c
> @@ -252,8 +252,8 @@ int launch_command_file_worker(void) {
>   		command_wproc->sd = sv[0];
>   		ret = iobroker_register(nagios_iobs, command_wproc->sd, command_wproc, command_input_handler);
>   		if (ret < 0) {
> -			logit(NSLOG_RUNTIME_ERROR, TRUE, "Failed to register command file worker socket %d with io broker %p\n",
> -				  command_wproc->sd, nagios_iobs);
> +			logit(NSLOG_RUNTIME_ERROR, TRUE, "Failed to register command file worker socket %d with io broker %p: %s\n",
> +				  command_wproc->sd, nagios_iobs, iobroker_strerror(ret));
>   			goto err_ioc;
>   		}
>   		logit(NSLOG_INFO_MESSAGE, TRUE, "Successfully launched command file worker with pid %d\n",
> 


-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov




More information about the Developers mailing list