go-daemon
go-daemon copied to clipboard
Doesn't work on macOS
the sample doesn't work on my machine (macOS 11) – the process exits immediately – the pidfile exists for a few milliseconds and then is deleted.
some info that might help:
$ go version
go version go1.16.5 darwin/amd64
$ uname -a
Darwin Barteks-MacBook-Pro.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
Hi Bartek,
Unfortunately, I have no access to Macos 11, hence can’t reproduce it. Could you please elaborate what “doesn’t work” means?
Thanks!
On Mon, 14 Jun 2021 at 19:07, Bartek Pacia @.***> wrote:
the sample https://github.com/sevlyar/go-daemon/blob/master/examples/cmd/gd-simple/simple.go doesn't work on my machine (macOS 11)
some info that might help:
$ go version go version go1.16.5 darwin/amd64 $ uname -a Darwin Barteks-MacBook-Pro.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sevlyar/go-daemon/issues/76, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJLTVVLEDQ2DHBKCGDSJ2LTSYZLLANCNFSM46VT3ZKQ .
Hi Denis,
by "doesn't work" I mean that the dameon exits immediately. In other words, in behaves like a normal program – it executes main and finishes execution.
I worked on one of my applications on macOS 11 just this morning and it worked well. I had to kill the process, it did not exit immediately.
It's this file, mainly. My main() function is rather simple:
func main() {
startServer()
}
I suspect that there might be your problem?