reproc_typestruct stores all the necessary information for further calls to reproc.
reproc_typestruct manually in the new context and call reproc's function for stopping a process.
reproc_typestruct contains different information depending on the platform but the rest of the code would still be cross platform.
std::sortof 65k elements works as fast as
std::partial_sortof 10 (out of 65k total) elements.