From 36e060aa60b83f6abfd0830e1bb43a49b13fd1d3 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 18 Dec 2018 16:47:42 +0100 Subject: [PATCH] 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 --- lightningd/lightningd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index 66e95a461..37f38aff1 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -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); } }