jpillora / overseer

Monitorable, gracefully restarting, self-upgrading binaries in Go (golang)
MIT License
2.33k stars 209 forks source link

Windows triggerRestart() not working #51

Open chicknsoup opened 4 years ago

chicknsoup commented 4 years ago

Similar to watchParrent(), we cannot send signals between windows processes, so triggerRestart() obviously does not work.

To fix this, we have to find a way to send/receive messages between master/slave processes.

What do you think? @jpillora

jpillora commented 4 years ago

It would be good to swap from signals to a more cross-platform approach. Can windows use net.ListenUnix? If so I'm thinking we listen with a random socket file, then we pass the filename into the child process. Then we can have proper bi-directional communications, where we remove all of the signal handling (except user restarts) and use socket file tcp instead

On Tue, 7 Apr 2020 at 14:13, chicknsoup notifications@github.com wrote:

Similar to watchParrent(), we cannot send signals between windows processes, so triggerRestart() obviously does not work.

To fix this, we have to find a way to send/receive messages between master/slave processes.

  • gRPC over tcp
  • RESTful
  • Windows API (like postmessage/sendmessage)

What do you think? @jpillora https://github.com/jpillora

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jpillora/overseer/issues/51, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X44N6FNXXTSSOYZKSCDRLKR6LANCNFSM4MCZKC4Q .

chicknsoup commented 4 years ago

Yes, recent versions of Windows support AF_UNIX, so net.ListenUnix works. Just did a quick test on my Windows 10 machine, it works as expected.