Skip to content

Fix SSH hanging on nohup background processes#122

Merged
myleshorton merged 1 commit intomainfrom
fix-e2e-cgo
Mar 4, 2026
Merged

Fix SSH hanging on nohup background processes#122
myleshorton merged 1 commit intomainfrom
fix-e2e-cgo

Conversation

@myleshorton
Copy link
Contributor

Summary

  • Deploy step was hanging 9+ minutes after SCP completed in 3.6s
  • Root cause: nohup ... & inherits stdin from the SSH session, keeping the connection open indefinitely
  • Fix: add < /dev/null to all nohup commands so SSH can disconnect immediately

Test plan

  • Merge, then gh workflow run e2e.yaml

🤖 Generated with Claude Code

SSH waits for all file descriptors to close before disconnecting.
The nohup'd background processes inherited stdin from the SSH session,
keeping the connection alive indefinitely. Adding < /dev/null closes
stdin so SSH can disconnect immediately after launching processes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 4, 2026 02:30
@myleshorton myleshorton merged commit 39352a4 into main Mar 4, 2026
2 checks passed
@myleshorton myleshorton deleted the fix-e2e-cgo branch March 4, 2026 02:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the e2e GitHub Actions deploy workflow to prevent SSH sessions from hanging after launching background services via nohup ... & by explicitly closing stdin for those processes.

Changes:

  • Add < /dev/null to the remote nohup python3 -m http.server ... & invocation.
  • Add < /dev/null to each remote nohup /root/lantern-box run ... & invocation and document the reason inline.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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.

2 participants