Documentation
¶
Overview ¶
Package process provides a mechanism for running processes under a different user account to the current process
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
SystemError error
ExitError *exec.ExitError
Duration time.Duration
Aborted bool
KernelTime time.Duration
UserTime time.Duration
}
func (*Result) CrashCause ¶
Unlike on Windows, if there is a system error, we don't crash the worker, since this can be caused by task that tries to execute a non-existing command or a file that isn't executable. On Windows all commands are wrapped in a command shell execution, where not being able to execute a shell should cause the worker to panic.
func (*Result) Crashed ¶
Unlike on Windows, if there is a system error, we don't crash the worker, since this can be caused by task that tries to execute a non-existing command or a file that isn't executable. On Windows all commands are wrapped in a command shell execution, where not being able to execute a shell should cause the worker to panic.
func (*Result) ExitCode ¶
Returns the exit code, or
-1 if the process has not exited -2 if the process crashed -3 it could not be established what happened -4 if process was aborted
func (*Result) Failed ¶
Unlike on Windows, a system error is grounds for a task failure, rather than a task exception, since it can be caused by e.g. a task trying to execute a command that doesn't exist, or trying to execute a file that isn't executable. Therefore a system error, or an exit error (process ran but returned non-zero exit code) or a task abortion are all task failures.