From: Sebastian Harl Date: Fri, 15 Jan 2010 09:07:39 +0000 (+0100) Subject: exec plugin: Improved some error messages. X-Git-Tag: collectd-4.8.4~35^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6bed4b118be72ff649a4d7547bcc4dfffcd887f0;p=collectd.git exec plugin: Improved some error messages. --- diff --git a/src/exec.c b/src/exec.c index 8719201e..3a72ebac 100644 --- a/src/exec.c +++ b/src/exec.c @@ -281,8 +281,8 @@ static void exec_child (program_list_t *pl) /* {{{ */ status = getpwnam_r (pl->user, &sp, nambuf, sizeof (nambuf), &sp_ptr); if (status != 0) { - ERROR ("exec plugin: getpwnam_r failed: %s", - sstrerror (errno, errbuf, sizeof (errbuf))); + ERROR ("exec plugin: Failed to get user information for user ``%s'': %s", + pl->user, sstrerror (errno, errbuf, sizeof (errbuf))); exit (-1); } if (sp_ptr == NULL) @@ -311,7 +311,8 @@ static void exec_child (program_list_t *pl) /* {{{ */ status = getgrnam_r (pl->group, &gr, nambuf, sizeof (nambuf), &gr_ptr); if (0 != status) { - ERROR ("exec plugin: getgrnam_r failed: %s", + ERROR ("exec plugin: Failed to get group information " + "for group ``%s'': %s", pl->group, sstrerror (errno, errbuf, sizeof (errbuf))); exit (-1); } @@ -377,8 +378,8 @@ static void exec_child (program_list_t *pl) /* {{{ */ status = execvp (pl->exec, pl->argv); - ERROR ("exec plugin: exec failed: %s", - sstrerror (errno, errbuf, sizeof (errbuf))); + ERROR ("exec plugin: Failed to execute ``%s'': %s", + pl->exec, sstrerror (errno, errbuf, sizeof (errbuf))); exit (-1); } /* void exec_child }}} */