0

I'm working under cli tool which must communicate with another foreground always running processes. Tool will be used on Windows|MacOS machines. I had a problem with the choice of architecture for it, here are my thoughts:

  • single binary, spawn daemon process[es] on start, communicate with signals or via loopback network. There could be lot of headache with daemonization (have no clue how to daemonize windows process), daemon status checks.
  • multiple executable files. Drawback - not obvious how cli could find worker process(pid files? process name lookup?), probably deployment issues.

I will be grateful for any advice on the topic of my problem

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
user4549992
  • 339
  • 1
  • 3
  • 11
  • 1
    https://stackoverflow.com/questions/39407592/named-pipes-in-go-for-both-windows-and-linux – Hans Passant Nov 30 '17 at 09:38
  • 1
    Bear in mind that Go offers no support for daemonizing a process. Your only option is to background it when it's executed (e.g. on mac/linux `nohup myapp &`). – Adrian Nov 30 '17 at 14:29

0 Answers0