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

Using os.Args includes the process bin name #34

Closed
timfallmk opened this issue Jan 25, 2018 · 1 comment
Closed

Using os.Args includes the process bin name #34

timfallmk opened this issue Jan 25, 2018 · 1 comment

Comments

@timfallmk
Copy link

From the comment:

// If Args is non-nil, it gives the command-line args for the
// daemon-process. If it is nil, the result of os.Args will be used
// (without program name).

This is not strictly true. prepareEnv, in the case no Args passed, sets the Args equal to os.Arg which includes the process name. Changing this to the following would fix it.

d.Args = os.Args[1:]

I suspect this is related to #33

@sevlyar
Copy link
Owner

sevlyar commented Mar 5, 2018

Thank you for the report, @timfallmk
I will fix documentation.

@sevlyar sevlyar mentioned this issue Mar 5, 2018
@sevlyar sevlyar closed this as completed Mar 5, 2018
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