init: Reap tested subdaemon processes to release OS resources

The processes that were used to test the subdaemon versions were not
reaped correctly keeping some resources bound.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker 2018-12-18 16:47:42 +01:00 committed by Rusty Russell
parent 6f027a24a0
commit 36e060aa60

View File

@ -293,6 +293,10 @@ void test_subdaemons(const struct lightningd *ld)
|| verstring[strlen(version())] != '\n')
errx(1, "%s: bad version '%s'",
subdaemons[i], verstring);
/*~ finally reap the child process, freeing all OS
* resources that go with it */
waitpid(pid, NULL, 0);
}
}