I have client/server program in C, through which I am transferring files to the client from server.
But the client is waiting for recv even after receiving the last byte of the file. Client is terminating only if I kill it or server is killed by me. But server has to be in a loop as it to has to entertain the request of other clients.
I am using fork()
in the server to entertain the request of each client. I'm exiting from the child process after the request of the client has been entertained, but the client is terminating only when the whole server program is killed.
Why doesn't the client terminate when the server's child exits?