News for hackers. Stuff that matters.
Re:Upgrading Executable on the Fly by duskwuff on Tuesday January 04, 2022 @03:58PM (#29800393)
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.
Re:Upgrading Executable on the Fly by mholt on Tuesday January 04, 2022 @04:51PM (#29801061)
Yep, we don't use SO_REUSEPORT. We just pass it from the old process to the new one.
Re:Upgrading Executable on the Fly by tyingq on Tuesday January 04, 2022 @04:00PM (#29800429)
You could also be fancy and pass open sockets over a unix domain socket with sendmsg().
Re:Upgrading Executable on the Fly by xyzzy_plugh on Tuesday January 04, 2022 @08:17PM (#29803598)
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.