Skip to content

Commit 36e060a

Browse files
cdeckerrustyrussell
authored andcommitted
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>
1 parent 6f027a2 commit 36e060a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightningd/lightningd.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ void test_subdaemons(const struct lightningd *ld)
293293
|| verstring[strlen(version())] != '\n')
294294
errx(1, "%s: bad version '%s'",
295295
subdaemons[i], verstring);
296+
297+
/*~ finally reap the child process, freeing all OS
298+
* resources that go with it */
299+
waitpid(pid, NULL, 0);
296300
}
297301
}
298302

0 commit comments

Comments
 (0)