Not closing bash processes (CYGWIN)

We can connect to our local or remote systems’ bash and could execute some commands to do something in operating system level. In this case, we use “ksc_connect” to connect system, then give some OS level commands and to exit/to close connection we use “ksc_exit”. But If you use this system more than one you get a error message that says “Could not logon to ….”

There could be many connection geting created to get connected to the server. And they still remain open even after “ksc_exit” and new connection could get not allowed. In the other hand, when we use “exit” command, it fails on the “ksc_exit” command, since the “exit” command before it already killed the session. But, in this case, the amount of sessions does not continue to grow. What this means to us is the “exit” command worked properly – but the “ksc_exit” command does not in terms of closing the session which was opened.

Why does the standard unix “exit” command close the session properly, but the “ksc_exit command” does not, I still don’t know why but there is a line of bash code could help us;

Go to your CYGWIN shell, and add this line:

echo >> .bashrc ; echo “export TMOUT=600” >> .bashrc

this will help in closing the connection only for those session which are inactive.

If you have more useful solution please inform me.

Leave a Reply

Skip to toolbar