func GetState(fd int) (*State, error) {
	state, err := terminal.GetState(fd)
	if err != nil {
		return nil, err
	}

	currentState := State(*state)
	return &currentState, nil
}
func GetState(fd int) (*State, error) {
	state, err := terminal.GetState(fd)
	if err != nil {
		return nil, err
	}

	currentState := State(*state)
	return &currentState, nil
}
// GetState returns the current state of a terminal which may be useful to restore the terminal after a signal.