Skip to content

signals: enable hotreload on Windows via pipe#151

Open
JoshVanL wants to merge 5 commits intodapr:mainfrom
JoshVanL:signals-windows-pipe
Open

signals: enable hotreload on Windows via pipe#151
JoshVanL wants to merge 5 commits intodapr:mainfrom
JoshVanL:signals-windows-pipe

Conversation

@JoshVanL
Copy link
Copy Markdown
Contributor

Windows does not support SIGHUP, so OnHUP was previously a no-op. This replaces the no-op with a named pipe listener at
\\.\pipe\dapr-reload-<PID>. Any connection to the pipe triggers a full

Adds SignalReload(pid) as a cross-platform API for triggering reloads (sends SIGHUP on POSIX, connects to the named pipe on Windows).

Copilot AI review requested due to automatic review settings March 23, 2026 12:25
@JoshVanL JoshVanL requested review from a team as code owners March 23, 2026 12:25
Copy link
Copy Markdown
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

Enables hot-reload signaling on Windows by replacing the previous no-op OnHUP behavior with a Windows named-pipe listener, and introduces a cross-platform SignalReload(pid) API (SIGHUP on POSIX, pipe connect on Windows).

Changes:

  • Implement Windows OnHUP reload signaling via \\.\pipe\dapr-reload-<PID> named pipe connections.
  • Add cross-platform helpers: ReloadPipeName, listenPipe (platform-specific), and SignalReload(pid).
  • Add github.com/Microsoft/go-winio dependency for Windows named pipe support.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
signals/signals_windows.go Implements Windows reload handling by accepting named-pipe connections and emitting reload contexts.
signals/pipe_windows.go Adds Windows named-pipe utilities and SignalReload implementation via go-winio.
signals/pipe_posix.go Adds POSIX stubs for pipe helpers and implements SignalReload via SIGHUP.
go.mod Adds github.com/Microsoft/go-winio v0.6.2 dependency.

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

Windows does not support SIGHUP, so OnHUP was previously a no-op. This
replaces the no-op with a named pipe listener at
`\\.\pipe\dapr-reload-<PID>`. Any connection to the pipe triggers a full

Adds SignalReload(pid) as a cross-platform API for triggering reloads
(sends SIGHUP on POSIX, connects to the named pipe on Windows).

Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Copy link
Copy Markdown
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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


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

Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
@@ -0,0 +1,53 @@
/*
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is what the _windows suffix of the filename is doing

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.

3 participants