code: func prepareProcessExec(c *Container, cmd []string, tty bool) (*os.File, error) {
  	f, err := ioutil.TempFile("", "exec-process-")
  	if err != nil {
  		return nil, err
  	}
  
  	pspec := c.Spec().Process
  	pspec.Args = cmd
  	// We need to default this to false else it will inherit terminal as true
  	// from the container.
  	pspec.Terminal = false
  	if tty {
  		pspec.Terminal = true
  	}
  	processJSON, err := json.Marshal(pspec)
  	if err != nil {
  		return nil, err
  	}
  
  	if err := ioutil.WriteFile(f.Name(), processJSON, 0644); err != nil {
  		return nil, err
  	}
  	return f, nil
  }
docs: // prepareProcessExec returns the path of the process.json used in runc exec -p
  // caller is responsible to close the returned *os.File if needed.