Commit dbc2be91 authored by helloPiers's avatar helloPiers Committed by Brad Fitzpatrick

windows/svc/mgr: correct documentation for args parameter of Mgr.CreateService

The args passed to Mgr.CreateService end up as the command-line
arguments (available via os.Args), not as the args passed to
Svc.Handler.Execute.

Fixes golang/go#20440

Change-Id: I55a1ec3432b377082c018fe960114c96350e8978
Reviewed-on: https://go-review.googlesource.com/43714Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent a2e06a18
......@@ -76,8 +76,10 @@ func toStringBlock(ss []string) *uint16 {
// CreateService installs new service name on the system.
// The service will be executed by running exepath binary.
// Use config c to specify service parameters.
// If service StartType is set to StartAutomatic,
// args will be passed to svc.Handle.Execute.
// Any args will be passed as command-line arguments when
// the service is started; these arguments are distinct from
// the arguments passed to Service.Start or via the "Start
// parameters" field in the service's Properties dialog box.
func (m *Mgr) CreateService(name, exepath string, c Config, args ...string) (*Service, error) {
if c.StartType == 0 {
c.StartType = StartManual
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment