How I should run my Golang process in background?

后端 未结 5 991
小蘑菇
小蘑菇 2021-01-30 12:19

This question is not strictly programming related, but for sure important for programmers.

I wrote a simple smtp server, when I run it from console all is fine, except i

5条回答
  •  被撕碎了的回忆
    2021-01-30 12:24

    I wrote a blog post about this a while back. The idea of daemonizing seems wrong to me as it leaves you with a lot of other things to worry about (e.g. what happens when it fails? how do you manage a process restart? how do you handle logging, working directory, cores, system restart, etc...)

    Turns out, if you don't try to do all that, things get much easier.

提交回复
热议问题