Why does the connection break when I kill a process on remote host?

Sna connected and fork a new process, how to close the connection?

  • Answer:

    Terrific answer above mine. Time for a vote.

bron110 at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Terrific answer above mine. Time for a vote.

Sanitize...

What you should be doing, if were following good programming practice, is that you close the socket in parent process that is supposed to be used in child process. This will remove so many issues. So immediately after the fork call, check the status returned by the call. If its parent, don't wait long before you close this un used socket. The immediate statement must be to close the socket in parent.

KS

What you should be doing, if were following good programming practice, is that you close the socket in parent process that is supposed to be used in child process. This will remove so many issues. So immediately after the fork call, check the status returned by the call. If its parent, don't wait long before you close this un used socket. The immediate statement must be to close the socket in parent.

KS

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.