From: ciomaire Date: Tue, 3 May 2016 11:41:14 +0000 (+0200) Subject: kill correct pid on fdopen failure X-Git-Tag: collectd-5.5.2~6^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fbb3081cacdf5ad6991e695b55c995c60a83eb64;p=collectd.git kill correct pid on fdopen failure --- diff --git a/src/exec.c b/src/exec.c index d560f465..83055dac 100644 --- a/src/exec.c +++ b/src/exec.c @@ -744,8 +744,7 @@ static void *exec_notification_one (void *arg) /* {{{ */ char errbuf[1024]; ERROR ("exec plugin: fdopen (%i) failed: %s", fd, sstrerror (errno, errbuf, sizeof (errbuf))); - kill (pl->pid, SIGTERM); - pl->pid = 0; + kill (pid, SIGTERM); close (fd); sfree (arg); pthread_exit ((void *) 1);