MCPcopy Index your code
hub / github.com/opencontainers/runc / checkTerminal

Method checkTerminal

utils_linux.go:328–338  ·  view source on GitHub ↗
(config *specs.Process)

Source from the content-addressed store, hash-verified

326}
327
328func (r *runner) checkTerminal(config *specs.Process) error {
329 detach := r.detach || (r.action == CT_ACT_CREATE)
330 // Check command-line for sanity.
331 if detach && config.Terminal && r.consoleSocket == "" {
332 return errors.New("cannot allocate tty if runc will detach without setting console socket")
333 }
334 if (!detach || !config.Terminal) && r.consoleSocket != "" {
335 return errors.New("cannot use console socket if runc will not detach or allocate tty")
336 }
337 return nil
338}
339
340func validateProcessSpec(spec *specs.Process) error {
341 if spec == nil {

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected