Add new options to Windows SysProcAttr
Package syscall is mostly frozen, but process creation is an exception: without it, using new Windows process features through os/exec would mean forking both syscall and os/exec. This proposal lets Windows callers set the job object list, console, desktop, AppContainer, and experimental sandbox for a new process (using syscall.SysProcAttr).
cmd := exec.Command("tool.exe")
cmd.SysProcAttr = &syscall.SysProcAttr{
Jobs: []syscall.Handle{job},
Desktop: `winsta0\default`,
AppContainer: &syscall.AppContainer{
SID: containerSID,
Capabilities: caps,
},
}
err := cmd.Run()
- Proposal
- #80415 by rsc
- Status
- Accepted on Sep 16, 2026
- Impact
- low
- Area
- syscall