code: func setCloseOnExec(fd uintptr, enabled bool) error {
  	flags, err := getFdFlags(fd)
  	if err != nil {
  		return err
  	}
  
  	newFlags := flags
  	if enabled {
  		newFlags |= unix.FD_CLOEXEC
  	} else {
  		newFlags &= ^unix.FD_CLOEXEC
  	}
  
  	if newFlags == flags {
  		return nil // noop
  	}
  
  	_, err = unix.FcntlInt(fd, unix.F_SETFD, newFlags)
  	return err
  }
docs: // setCloseOnExec sets or unsets the CLOEXEC flag on the provided file descriptor
  // depending upon the value of the enabled arg.