gexec/exit_matcher.go
func Exit(optionalExitCode ...int) *exitMatcher {
	exitCode := -1
	if len(optionalExitCode) > 0 {
		exitCode = optionalExitCode[0]
	}

	return &exitMatcher{
		exitCode: exitCode,
	}
}
func Exit(optionalExitCode ...int) *exitMatcher {
	exitCode := -1
	if len(optionalExitCode) > 0 {
		exitCode = optionalExitCode[0]
	}

	return &exitMatcher{
		exitCode: exitCode,
	}
}
/*
The Exit matcher operates on a session:

	Expect(session).Should(Exit(<optional status code>))

Exit passes if the session has already exited.

If no status code is provided, then Exit will succeed if the session has exited regardless of exit code.
Otherwise, Exit will only succeed if the process has exited with the provided status code.

Note that the process must have already exited.  To wait for a process to exit, use Eventually:

	Eventually(session, 3).Should(Exit(0))
*/