diff options
Diffstat (limited to 'libgo/go/syscall/exec_windows.go')
-rw-r--r-- | libgo/go/syscall/exec_windows.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libgo/go/syscall/exec_windows.go b/libgo/go/syscall/exec_windows.go index 68779c461a0..82abc0715e5 100644 --- a/libgo/go/syscall/exec_windows.go +++ b/libgo/go/syscall/exec_windows.go @@ -132,7 +132,7 @@ func SetNonblock(fd Handle, nonblocking bool) (err error) { // getFullPath retrieves the full path of the specified file. // Just a wrapper for Windows GetFullPathName api. func getFullPath(name string) (path string, err error) { - p, err := utf16PtrFromString(name) + p, err := UTF16PtrFromString(name) if err != nil { return "", err } @@ -228,8 +228,9 @@ type ProcAttr struct { } type SysProcAttr struct { - HideWindow bool - CmdLine string // used if non-empty, else the windows command line is built by escaping the arguments passed to StartProcess + HideWindow bool + CmdLine string // used if non-empty, else the windows command line is built by escaping the arguments passed to StartProcess + CreationFlags uint32 } var zeroProcAttr ProcAttr @@ -264,7 +265,7 @@ func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle return 0, 0, err } } - argv0p, err := utf16PtrFromString(argv0) + argv0p, err := UTF16PtrFromString(argv0) if err != nil { return 0, 0, err } @@ -281,7 +282,7 @@ func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle var argvp *uint16 if len(cmdline) != 0 { - argvp, err = utf16PtrFromString(cmdline) + argvp, err = UTF16PtrFromString(cmdline) if err != nil { return 0, 0, err } @@ -289,7 +290,7 @@ func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle var dirp *uint16 if len(attr.Dir) != 0 { - dirp, err = utf16PtrFromString(attr.Dir) + dirp, err = UTF16PtrFromString(attr.Dir) if err != nil { return 0, 0, err } @@ -325,7 +326,8 @@ func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle pi := new(ProcessInformation) - err = CreateProcess(argv0p, argvp, nil, nil, true, CREATE_UNICODE_ENVIRONMENT, createEnvBlock(attr.Env), dirp, si, pi) + flags := sys.CreationFlags | CREATE_UNICODE_ENVIRONMENT + err = CreateProcess(argv0p, argvp, nil, nil, true, flags, createEnvBlock(attr.Env), dirp, si, pi) if err != nil { return 0, 0, err } |