AmigaLabs / clib4

Clib4 for AmigaOS4
Other
14 stars 7 forks source link

Beta10 - patches to fix performance of spawnvpe+waitpid #204

Closed elfpipe closed 1 month ago

elfpipe commented 1 month ago

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.

afxgroup commented 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

elfpipe commented 1 month ago

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.

afxgroup commented 1 month ago

So can you change the interface and stubs and commit?

elfpipe commented 1 month ago

Done.