fix: install signal handlers should occur after plugins started #434
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After splitting out a large PR of changes to apply #432 - I noted that I had previously applied the installed signal handlers, after the ffi framework has started the plugins.
Due to this, we are still encountering the issues in the project. Here is one on the mock server side
I actually wonder if on the verifier side, we will catch it in the pactffi_verifier_execute function, or if we need to actually install the signal handlers after this is called, discovering any required plugins from the pact sources, starting them. Then install the signal handlers, all before the pactffi_verifier_execute function returns.
I am going to test out a hypothesis in the pact-plugin-driver, but for now this appears to be pretty resiliant with multiple runs.
I'll be adding an additional PR with
and following on from that Windows support, however that is blocked as I have an issue with plugins failed to shutdown cleanly