A lot of `fork_accept.c` is already implemented and pretty well documented in @fuzyll's [libctf](https://github.com/fuzyll/libctf). It might be worthwhile to fork it / submodule it / contribute to it rather than starting anew.