Exemple #1
0
func ExecAndSend(sub *subprocess.Subprocess, c chan RunResult, ptype ProcessType) {
	var r RunResult
	r.T = ptype
	r.S = sub
	r.R, r.E = sub.Execute()
	if r.E != nil {
		if subprocess.IsUserError(r.E) {
			r.V = CRASH
		} else {
			r.V = FAIL
		}
	} else {
		r.V = GetVerdict(r.R)
	}
	c <- r
}
Exemple #2
0
func execAndSend(sub *subprocess.Subprocess, c chan runResult, second bool) {
	var r runResult
	r.second = second
	r.r, r.e = sub.Execute()
	c <- r
}