I would prefer to revert basic_client.c to its previous form. If we want to be able to try this scenario we could add a flag to release after main (or perhaps a completely different example).
Ideally, though, we would have an automated test instead. Can the problem be reproduced deterministically? Couldn't we implement a test that launches a client process that releases after main and ensure that the process shuts down properly?
The code looks ok.
I would prefer to revert basic_client.c to its previous form. If we want to be able to try this scenario we could add a flag to release after main (or perhaps a completely different example).
Ideally, though, we would have an automated test instead. Can the problem be reproduced deterministically? Couldn't we implement a test that launches a client process that releases after main and ensure that the process shuts down properly?