go-daemon icon indicating copy to clipboard operation
go-daemon copied to clipboard

Doesn't work on macOS

Open bartekpacia opened this issue 4 years ago • 3 comments

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

bartekpacia avatar Jun 14 '21 17:06 bartekpacia

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 .

deniszh avatar Jun 15 '21 07:06 deniszh

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.

bartekpacia avatar Jun 15 '21 08:06 bartekpacia

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?

dertuxmalwieder avatar Jul 13 '21 13:07 dertuxmalwieder