The default behavior of CommandContext is to immediately kill the command process when receiving cancellation signal from the context, which may lead to corrupted terraform state.
This PR adds the option to allow sending interruption signal to the Apply/Destroy command and wait for a graceful period before forcefully killing the process. Note that the option doesn't work on Windows due to the lack of support of sending interrupt signal.
Test: all ut and e2e passed, verified the behavior with RWC CLI
The default behavior of CommandContext is to immediately kill the command process when receiving cancellation signal from the context, which may lead to corrupted terraform state.
This PR adds the option to allow sending interruption signal to the Apply/Destroy command and wait for a graceful period before forcefully killing the process. Note that the option doesn't work on Windows due to the lack of support of sending interrupt signal.
Test: all ut and e2e passed, verified the behavior with RWC CLI