code: func newStdioPipes(fifos *cio.FIFOSet) (_ *stdioPipes, _ *wgCloser, err error) {
  	var (
  		f           io.ReadWriteCloser
  		set         []io.Closer
  		ctx, cancel = context.WithCancel(context.Background())
  		p           = &stdioPipes{}
  	)
  	defer func() {
  		if err != nil {
  			for _, f := range set {
  				f.Close()
  			}
  			cancel()
  		}
  	}()
  
  	if fifos.Stdin != "" {
  		if f, err = fifo.OpenFifo(ctx, fifos.Stdin, syscall.O_WRONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil {
  			return nil, nil, err
  		}
  		p.stdin = f
  		set = append(set, f)
  	}
  
  	if f, err = fifo.OpenFifo(ctx, fifos.Stdout, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil {
  		return nil, nil, err
  	}
  	p.stdout = f
  	set = append(set, f)
  
  	if f, err = fifo.OpenFifo(ctx, fifos.Stderr, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil {
  		return nil, nil, err
  	}
  	p.stderr = f
  	set = append(set, f)
  
  	return p, &wgCloser{
  		wg:     &sync.WaitGroup{},
  		set:    set,
  		ctx:    ctx,
  		cancel: cancel,
  	}, nil
  }
docs: // newStdioPipes creates actual fifos for stdio.