From: Florian Forster Date: Sun, 4 Nov 2007 13:20:43 +0000 (+0100) Subject: exec plugin: Set PID of failed programs back to zero. X-Git-Tag: collectd-4.1.4~4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=65127ea4b6642da201b904cee5ddd792b56a566d;p=collectd.git exec plugin: Set PID of failed programs back to zero. Otherwise the program will not be executed ever again after it failed once. --- diff --git a/src/exec.c b/src/exec.c index d9f2d8ce..fd20191a 100644 --- a/src/exec.c +++ b/src/exec.c @@ -295,6 +295,7 @@ static void *exec_read_one (void *arg) ERROR ("exec plugin: fdopen (%i) failed: %s", fd, sstrerror (errno, errbuf, sizeof (errbuf))); kill (pl->pid, SIGTERM); + pl->pid = 0; close (fd); pthread_exit ((void *) 1); }