Closed elfpipe closed 1 month ago
Can we remove spawnve_callback from functions list and use it for something else? I think no one is using it at moment so I don't think it is a big deal. We can add a void *unused or something similar and add the next function there
Yes, I think we can remove spawnvpe_callback. It is a beautiful construct, but I don't think it is useful for anything at this point. So we can use the space for something else.
So can you change the interface and stubs and commit?
Done.
There were different mistakes in the code, making it impossible for waitpid to find the return code element in the children hashmap.
1) uuid4_generate would not properly seed the random state, so it would return the same uuid repeatedly.
2) spawnedProcessExit and insertSpawned children would do a mish-mash of parent and child pids, so the search/insertion would fail.
3) WEXITSTATUS would do an unnecessary shift, resulting in the wrong return code.