function onClose() {
		if ( self._settings.bracketedPaste && self._settings.autoDisableBracketedPasteOnExit ) { // eslint-disable-line max-len
			self._multilineHandler.disableBracketedPaste();
		}
		ostream.end();
		ostream.unpipe();

		debug( 'Readline interface closed.' );
		self._istream.removeListener( 'keypress', onKeypress );
		proc.removeListener( 'SIGWINCH', onSIGWINCH );

		debug( 'Exiting REPL...' );
		self.emit( 'exit' );
	}
Callback invoked upon a readline interface "close" event.

@private