Skip to content

Conversation

@AppleLamps
Copy link

Problem

The playground fails to compile on Windows with:

undefined: syscall.SIGTSTP

Windows doesn't have SIGTSTP (suspend signal - Ctrl+Z), causing build failures.

Solution

  • Split signal handling into platform-specific files using build tags
  • signal_unix.go (+build unix) handles Unix-specific signals including SIGTSTP
  • Windows uses the default signal handling (os.Interrupt, SIGTERM)
  • Maintains the same functionality on both platforms

Testing

  • Tested on Windows 11 with Go 1.21+
  • Server starts successfully with go run .\cmd\playground\main.go start
  • Graceful shutdown works with Ctrl+C

@CLAassistant
Copy link

CLAassistant commented Dec 23, 2025

CLA assistant check
All committers have signed the CLA.

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