Hello Praveen,
In LR 12.02 and earlier - no way.
The only solutions are:
- wait for upcoming LR 12.50. It will have command TE_disconnect which allow to force terminal to disconnect. Also this command will be automatically recorded on any disconnection event (e.g issuing "exit" command to terminal or exiting from terminal using menu) except abnormal termination.
- if you have no time to wait and your LR is 12.x, please open Incident and I'll make patched DLLs for you version of LR. The only difference to LR 12.50 will be absence of syntax highlighting and no help support for new command.
Best regards,
Demian