Detecting peer died in multi thread environment
Newbie to this site..
I have a process with multiple threads inside. In one of the threads(A), there is a TCP socket
connection towards a server. Data is being sent from the thread A towards this server. At one point of
time, server is down abruptly, which is detected by the thread A only after 15 minutes.
During this 15 minutes, the data sent by thread A, using unix command "send" are successful.
1. why, the "send" command doesn't fail immediately? Why it takes 15 minutes for this detection?
2. I tried to catch the signal SIGPIPE in thread A itself using signal function, but it doesn't work, which means "send"
command still is successfull?
3. Should the signals be catched at thread level or process level?
Could you please clarify.
Sorry, if this forum is not the apt place for this query.