X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=b728654c893e6c5830a4b38d84dff876bb5a9aab;hb=71f65087f9d5f42f8944fa7ce416cb0e2f7f043e;hp=c84c1c7b63463440dd99aa71dd78f26c9c8a2b1a;hpb=79963d13c1884d1d92667cc502ad20758b084a12;p=collectd.git diff --git a/src/exec.c b/src/exec.c index c84c1c7b..b728654c 100644 --- a/src/exec.c +++ b/src/exec.c @@ -382,7 +382,7 @@ static int fork_child(program_list_t *pl, int *fd_in, int *fd_out, status = getpwnam_r(pl->user, &sp, nambuf, sizeof(nambuf), &sp_ptr); if (status != 0) { ERROR("exec plugin: Failed to get user information for user ``%s'': %s", - pl->user, sstrerror(errno, errbuf, sizeof(errbuf))); + pl->user, sstrerror(status, errbuf, sizeof(errbuf))); goto failed; } @@ -410,7 +410,7 @@ static int fork_child(program_list_t *pl, int *fd_in, int *fd_out, if (0 != status) { ERROR("exec plugin: Failed to get group information " "for group ``%s'': %s", - pl->group, sstrerror(errno, errbuf, sizeof(errbuf))); + pl->group, sstrerror(status, errbuf, sizeof(errbuf))); goto failed; } if (NULL == gr_ptr) {