code: func (c *commandConn) killIfStdioClosed() error {
  	c.stdioClosedMu.Lock()
  	stdioClosed := c.stdoutClosed && c.stdinClosed
  	c.stdioClosedMu.Unlock()
  	if !stdioClosed {
  		return nil
  	}
  	return c.kill()
  }
docs: // killIfStdioClosed kills the cmd if both stdin and stdout are closed.