Documentation ¶
Rendered for windows/amd64
Overview ¶
Windows JobObject utils for kill all child processes when parent process exits
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobObject ¶
type JobObject struct {
// contains filtered or unexported fields
}
Example ¶
e := exec.Command("notepad.exe") e.Start() job, err := Create() if err != nil { panic(err) } err = job.AddProcess(e.Process) if err != nil { panic(err) } // You can either close it or not. // when the owner process of the job exits, all jobs will be closed defer job.Close()
Output:
Click to show internal directories.
Click to hide internal directories.