Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,16 @@ try {
} finally {
for (const session of sessions) {
try {
session.kill("SIGKILL");
// Mark cancellation before signalling so a fast exit cannot beat the
// waiter's cancellation flag observation.
session.kill();
} catch {
// The child may have exited while another session was being stopped.
}
try {
session.kill();
session.kill("SIGKILL");
} catch {
// Mark cancellation even if the explicit SIGKILL already won the race.
// The cancellation-marking kill already stopped the process.
}
}
const exits = await deadline(Promise.all(waits), 5_000, "PTY_CLEANUP_TIMEOUT");
Expand Down
Loading