]> git.tuebingen.mpg.de Git - paraslash.git/commit
server: Perform hostname lookup in client process.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 6 Aug 2017 20:50:15 +0000 (22:50 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 8 Aug 2017 10:36:44 +0000 (12:36 +0200)
commit5924e7281692044588e6df713c5d6c694ddd69f1
tree3415d4c463464ce4005a66093c0feb1c65fc9ff3
parent746cf9c9c89b8b0c6f39b8ec3f07a0386e61a8ae
server: Perform hostname lookup in client process.

When a connection arrives at the TCP command socket, the server process
looks up the remote name before it forks the child process. This is bad
because the server process can not afford to sleep, but name lookup may
take some time, for example if a DNS server is currently unavailable.

We may as well look up the hostname after the fork in the child
process, where blocking operations are not a problem.
server.c