mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-05-02 03:02:54 -04:00
**What type of PR is this?** Bug fix **What does this PR do? Why is it needed?** All e2e component Stop() methods use Process.Kill() (SIGKILL), which terminates processes immediately without allowing them to perform cleanup (flushing data to disk, closing network connections, releasing resources). This can potentially lead to corrupted states or flaky e2e tests. This PR introduces a helpers.GracefulStop() function that sends SIGTERM first, giving the process 5 seconds to shut down cleanly, then falls back to SIGKILL if the process is still alive. All 8 e2e component Stop() methods are updated to use it. This is a correctness fix & not tied to a specific test failure. Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>