diff --git a/client/driver/executor/executor_windows.go b/client/driver/executor/executor_windows.go index 3b508184f..f7e05b8fa 100644 --- a/client/driver/executor/executor_windows.go +++ b/client/driver/executor/executor_windows.go @@ -9,10 +9,10 @@ import ( // configure new process group for child process func (e *UniversalExecutor) setNewProcessGroup() error { // We need to check that as build flags includes windows for this file - if e.cmd.SysProcAttr == nil { - e.cmd.SysProcAttr = &syscall.SysProcAttr{} + if e.childCmd.SysProcAttr == nil { + e.childCmd.SysProcAttr = &syscall.SysProcAttr{} } - e.cmd.SysProcAttr.CreationFlags = syscall.CREATE_NEW_PROCESS_GROUP + e.childCmd.SysProcAttr.CreationFlags = syscall.CREATE_NEW_PROCESS_GROUP return nil } diff --git a/client/fingerprint/network_windows.go b/client/fingerprint/network_windows.go index 8617a65a8..e71ce0ce9 100644 --- a/client/fingerprint/network_windows.go +++ b/client/fingerprint/network_windows.go @@ -14,7 +14,7 @@ func (f *NetworkFingerprint) linkSpeed(device string) int { outBytes, err := exec.Command(path, command).Output() if err != nil { - f.logger.Printf("[WARN] fingerprint.network: Error calling %s (%s): %v", path, command, err) + f.logger.Warn("failed to detect link speed", "path", path, "command", command, "error", err) return 0 } @@ -26,14 +26,14 @@ func (f *NetworkFingerprint) linkSpeed(device string) int { func (f *NetworkFingerprint) parseLinkSpeed(commandOutput string) int { args := strings.Split(commandOutput, " ") if len(args) != 2 { - f.logger.Printf("[WARN] fingerprint.network: Couldn't split LinkSpeed (%s)", commandOutput) + f.logger.Warn("couldn't split LinkSpeed output", "output", commandOutput) return 0 } unit := strings.Replace(args[1], "\r\n", "", -1) value, err := strconv.Atoi(args[0]) if err != nil { - f.logger.Printf("[WARN] fingerprint.network: Unable to parse LinkSpeed value (%s)", commandOutput) + f.logger.Warn("unable to parse LinkSpeed value", "value", commandOutput) return 0 }