Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback: successfully works on platforms #26

Open
kulak opened this issue Jul 14, 2017 · 3 comments
Open

Feedback: successfully works on platforms #26

kulak opened this issue Jul 14, 2017 · 3 comments

Comments

@kulak
Copy link

kulak commented Jul 14, 2017

Thank you for this library.

I have code that works successfully on the following platforms using this library:

  • FreeBSD
  • Linux Raspbian (on Pi 3)
  • Linux Ubuntu
  • Linux timesys (that's used by embedded hardware vendors)
  • Debian

I set current working directory, user IDs, redirect file output, use signals.

@sevlyar
Copy link
Owner

sevlyar commented Nov 24, 2017

@kulak Many thanks for the feedback.

I don't close the issue to keep future feedbacks about working platforms in one place.

❗️ Please, report bugs into a separate issue.

@ghost
Copy link

ghost commented Jan 23, 2018

When I try to use in windows 10 I get ".\daemon.go:50:14: undefined: syscall.Credential".

@kulak
Copy link
Author

kulak commented Jan 23, 2018

go-daemon is not supported on Windows. Windows has "Windows Services" API infrastructure that's completely different from Unix daemon model. I think there was a separate issue about windows were I made a similar comment.

I would not expect go-daemon to work on Windows. The best you can expect is to be able to compile go-daemon on Windows due to API stubs, but it will not run. So, in the end Windows target is kind of pointless. I higher level abstraction library may incorporate go-daemon and Windows. I am quite sure that this abstraction will loose a lot of capabilities of go-daemon and some of Windows service. For example, go-daemon standard streams can be captured. I don't recall ever working with standard output on windows services. Windows sends service a request to shutdown. The service can request for extension of shutdown time. Linux daemons don't have that.

In the end, it is the best to structure your application to be able to run on Linux and Windows platforms via 2 different top level entry files. That's what I would do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants