Skip to content

fix: increase SIGKILL timeout from 200ms to 5s for graceful shutdown#17

Open
akramcodez wants to merge 1 commit intoblackboxaicode:mainfrom
akramcodez:fix/process-termination-timeout
Open

fix: increase SIGKILL timeout from 200ms to 5s for graceful shutdown#17
akramcodez wants to merge 1 commit intoblackboxaicode:mainfrom
akramcodez:fix/process-termination-timeout

Conversation

@akramcodez
Copy link

Description

The 200ms SIGKILL timeout was too aggressive, causing race conditions and potential data corruption when terminating processes that need time for cleanup operations.

Solution

Increased timeout to 5 seconds (industry standard) to allow:

  • Buffer flushing and I/O completion
  • Lockfile cleanup (git, npm)
  • Graceful resource release

Changes

  • shellExecutionService.ts: SIGKILL_TIMEOUT_MS 200ms → 5000ms
  • shellExecutionService.test.ts: Test timeout updated to match

fixes #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aggressive Process Termination Causes Race Conditions

1 participant