This question is an extension to this previously asked question:
I implemented the solution given by jxh with following params:
SO_KEEPALIVE = Enabled
TCP_KEEPIDLE = 120 secs
TCP_KEEPINTVL = 75 secs
TCP_KEEPCNT = 1
Then why the server still waits forever for client to respond?
Also I found out on internet that
kill <pid>
actually sends SIGTERM
to the given process.
So I used ps -o pid,cmd,state
command after 'killing' the telnet application.
I saw that the telnet process was still there but with process state = T
, i.e. it was in STOPPED state
P.S.: I do not have much knowledge of Linux Signals, please consider that.