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

PID and Log files should respect workdir paths #32

Open
timfallmk opened this issue Jan 25, 2018 · 2 comments
Open

PID and Log files should respect workdir paths #32

timfallmk opened this issue Jan 25, 2018 · 2 comments

Comments

@timfallmk
Copy link

Currently, placing the pid and log files anywhere other than the current directory requires hardcoding the absolute paths into the name for each one. This is highly inflexible, and certainly not platform agnostic. I suggest a slight fix to allow the workdir to be included in the paths. A better fix might be to have a separate path for each one.

@sevlyar
Copy link
Owner

sevlyar commented Mar 5, 2018

Daemon doesn't have current directory (workdir) in general sense because it uses several global directories to ensure its work. By Filesystem Hierarchy Standard (FHS) pid-files should be placed in /var/run directory, log-files in /var/log, configuration in /etc. Additionally, there can be OS-specific differences and various functional-specific cases, e.g: you need an one log file or you need a directory to log file rotation and etc. So that using of workdir for a daemon doesn't have the sense in most cases.

go-daemon doesn't aim to be framework and i don't know how to implement flexible functional for all cases, so that i leave it out for client code.

@timfallmk
Copy link
Author

@sevlyar I agree they should default to that sensible output location, but currently it just dumps them where the command is being run from, which is less than ideal. I would take your solution over a workdir, but the current behavior doesn't do either.

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