On Mon, Apr 11, 2022 at 04:43:33PM +0200, Claudio Jeker wrote: > rpki-client starts a few processes and it can do this a bit more elegant > by factoring the common code out into process_start(). This makes the code > in main a fair bit shorter. > > I decided to move all pledge calles into the individual processes. In my > opinion there is little benefit in keeping them in main.
ok It is not really necessary to introduce the additional 'fd' variable in main(). You could pass in the appropriate fd variable directly procpid = process_start("parser", &proc); if (procpid == 0) { proc_parser(proc); errx(...) } etc and save a few more lines. Not sure if that's clearer or worth it.