Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(python): leftover jsii-kernel-* directories in TMPDIR (#2100)
The Python runtime did not properly signal shutdown to the `node` process hosting the *jsii kernel*, causing it to be abruptly killed on Python interpreter exit. This means the *jsii kernel*'s own clean-up code was not allowed to run. This adds an `atexit` hook which will properly close the `node` process' `STDIN` file descriptor, effectively signaling it should shut down. This then gives the process 5 seconds to clean up after itself and finish before sending it `SIGTERM` (at which point it is given 5 seconds to terminate after which it will be terminated).
- Loading branch information