mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
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:
committed by
Rusty Russell
parent
6f027a24a0
commit
36e060aa60
@@ -293,6 +293,10 @@ void test_subdaemons(const struct lightningd *ld)
|
|||||||
|| verstring[strlen(version())] != '\n')
|
|| verstring[strlen(version())] != '\n')
|
||||||
errx(1, "%s: bad version '%s'",
|
errx(1, "%s: bad version '%s'",
|
||||||
subdaemons[i], verstring);
|
subdaemons[i], verstring);
|
||||||
|
|
||||||
|
/*~ finally reap the child process, freeing all OS
|
||||||
|
* resources that go with it */
|
||||||
|
waitpid(pid, NULL, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user