klyn.process.PseudoTerminal.close
method
public close() as Void:
Description

Closes the terminal and terminates the child process if it is still alive.

Example
pty.close()