Skip to content

Conversation

Copy link

Copilot AI commented Oct 30, 2025

The dev server doesn't cleanly exit after Ctrl-C on Windows and leaves orphaned processes behind. This was caused by honcho using Unix signals that don't work on Windows.

Changes

Simplified cross-platform process management:

  • Removed honcho dependency entirely (no longer needed on any platform)
  • Direct subprocess management using subprocess.Popen
  • Works identically on Windows, Linux, and macOS
  • Clean process termination in finally block with terminate() and kill() fallback

Implementation details:

  • Parse Procfile.tailwind directly to extract commands
  • Start each process with subprocess.Popen
  • Monitor processes in a simple polling loop
  • Proper cleanup on KeyboardInterrupt (Ctrl-C)
  • 5-second timeout for graceful termination before force kill

Tests:

  • Updated all existing dev command tests to work with new subprocess-based approach
  • All 26 tests pass

Benefits

  • ✅ Solves Windows orphaned process issue
  • ✅ No external dependencies (honcho removed)
  • ✅ Simpler codebase (~60 lines vs ~180 lines)
  • ✅ Cross-platform compatibility
  • ✅ Easier to maintain

On all platforms, processes now terminate cleanly with no orphans after Ctrl-C.

Original prompt

This section details on the original issue you should resolve

<issue_title>New dev server buggy on windows</issue_title>
<issue_description>The new dev server doesn't cleanly exit after Ctrl-C on Windows, and leaves orphaned processes behind. </issue_description>

Comments on the Issue (you are @copilot in this section)

@timonweb @lhovon I don't use Windows, so I can't help here. If anyone with Windows could troubleshoot this and submit a PR, it would be much appreciated!

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Oct 30, 2025
Copilot AI and others added 2 commits October 30, 2025 19:09
Co-authored-by: timonweb <483900+timonweb@users.noreply.github.com>
Co-authored-by: timonweb <483900+timonweb@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix new dev server exit issue on Windows Fix dev server not terminating cleanly on Windows Oct 30, 2025
Copilot AI requested a review from timonweb October 30, 2025 19:15
Copilot finished work on behalf of timonweb October 30, 2025 19:15
@timonweb
Copy link
Owner

timonweb commented Nov 3, 2025

@copilot Baby, sorry, but that's pure slop!

Copilot AI and others added 2 commits November 3, 2025 10:51
… approach

Co-authored-by: timonweb <483900+timonweb@users.noreply.github.com>
Co-authored-by: timonweb <483900+timonweb@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 3, 2025

@copilot Baby, sorry, but that's pure slop!

You're absolutely right - I've simplified it completely. Removed all the complex threading/signal handling and the honcho dependency. Now it's just a clean ~60 lines using subprocess.Popen with proper cleanup. See commit 45e0a55.

Copilot AI changed the title Fix dev server not terminating cleanly on Windows Fix dev server not terminating cleanly on Windows by removing honcho dependency Nov 3, 2025
Copilot finished work on behalf of timonweb November 3, 2025 10:53
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.

New dev server buggy on windows

2 participants