Can I unmount a golang process without external tools?

I saw many different suggestions on how to demon an application written in Go, including using upstart or init.d. Why not just do it yourself? The steps seem to be quite simple:

  • Parent Plug and Out
  • Change file mode mask
  • Create a unique session identifier
  • Change current working directory
  • Close file descriptors

( source )

So, why not just do it in your program, and not depend on third-party software to complete a simple task for you?

+4
source share
1 answer

fork() Go . deamonize, C, .

, : https://github.com/VividCortex/godaemon

+1

Source: https://habr.com/ru/post/1569935/


All Articles