Ben Peart <peartben@xxxxxxxxx> writes: > +Types > +----- > + > +'int(*subprocess_start_fn)(struct subprocess_entry *entry)':: > + > + User-supplied function to initialize the sub-process. This is > + typically used to negoiate the interface version and capabilities. > + > + > +Functions > +--------- > + > +`subprocess_start`:: > + > + Start a subprocess and add it to the subprocess hashmap. > + > +`subprocess_stop`:: > + > + Kill a subprocess and remove it from the subprocess hashmap. > + > +`subprocess_find_entry`:: > + > + Find a subprocess in the subprocess hashmap. > + > +`subprocess_get_child_process`:: > + > + Get the underlying `struct child_process` from a subprocess. > + > +`subprocess_read_status`:: > + > + Helper function to read packets looking for the last "status=<foo>" > + key/value pair. OK. > diff --git a/sub-process.c b/sub-process.c > new file mode 100644 > index 0000000000..2c4d27c193 > --- /dev/null > +++ b/sub-process.c > @@ -0,0 +1,116 @@ > +/* > + * Generic implementation of background process infrastructure. > + */ > +#include "sub-process.h" > +#include "sigchain.h" > +#include "pkt-line.h" > + ... > +void subprocess_exit_handler(struct child_process *process) > +{ This is not only undocumented in the above, but it does not seem to be necessary to be a public function. The only thing that uses this is subprocess_start(), which is in this file. Perhaps make it static?