Comment on Upgrading Executable on the FlyparentComments−duskwuff4yYou don't even need that. If the old server process exec()s the new one, it can pass on its file descriptors -- including the listening socket -- when that happens.−mholt4yYep, we don't use SO_REUSEPORT. We just pass it from the old process to the new one.−tyingq4yYou could also be fancy and pass open sockets over a unix domain socket with sendmsg().−xyzzy_plugh4yThis is the best way as it avoids any sort of session/parenting issues which are not always easy to solve portably as a parent.
Comments
You don't even need that. If the old server process exec()s the new one, it can pass on its file descriptors -- including the listening socket -- when that happens.
Yep, we don't use SO_REUSEPORT. We just pass it from the old process to the new one.
You could also be fancy and pass open sockets over a unix domain socket with sendmsg().
This is the best way as it avoids any sort of session/parenting issues which are not always easy to solve portably as a parent.