Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 16
    Won't the operating system close any open file descriptors (including sockets) when the process terminates? Commented Jan 28, 2014 at 5:10
  • 9
    Yes it will. But suppose you are killing a server process with clients connected, then the clients won't notice that the server is gone before timeouts. Commented Jan 28, 2014 at 8:48
  • 57
    Ah yes the old "if it is in any way imperfect you are stupid to use it" argument. Commented Jan 28, 2014 at 19:17
  • 3
    Or stupid to use if if the process in question is your company's production Commented Jan 29, 2014 at 3:24
  • 5
    If a process is killed then the socket will send RST to the peer, where as if the process calls close or shutdown on the socket, then the socket sends FIN. There is no timeout needed. A timeout situation will only occur if the power is dropped or the network cable removed. Commented May 31, 2016 at 22:41