Closed Bug 1447265 Opened 6 years ago Closed 6 years ago

Use go 1.10 os/exec package for running processes with CreateProcessAsUser on Windows

Categories

(Taskcluster :: Workers, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pmoore, Unassigned)

References

Details

Currently we use github.com/taskcluster/runlib under the hood to manage executing processes on Windows using CreateProcessAsUser syscall.

From go 1.10 onwards, it is now possible to do this via the go standard library.

This can be done by setting (syscall.SysProcAttr).Token inside (os/exec.Cmd).SysProcAttr.

At the same time it may make sense to start using https://golang.org/pkg/os/exec/#CommandContext and then cancel the context in order to terminate the command.
(In reply to Pete Moore [:pmoore][:pete] from comment #0)

> At the same time it may make sense to start using
> https://golang.org/pkg/os/exec/#CommandContext and then cancel the context
> in order to terminate the command.

(when aborting a task)
Blocks: 1399401
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Released in generic-worker 10.7.7.
Blocks: 1180187
Component: Generic-Worker → Workers
You need to log in before you can comment on or make changes to this bug.