x-close-connection

x-close-connection is a built-in function in `C source code'.

(x-close-connection TERMINAL)

Close the connection to TERMINAL's X server.
For TERMINAL, specify a terminal object, a frame or a display name (a
string). If TERMINAL is nil, that stands for the selected frame's
terminal.