Using `os.Args` includes the process bin name
timfallmk opened this issue · comments
Tim commented
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
Sergey Yarmonov commented
Thank you for the report, @timfallmk
I will fix documentation.