Ok, so now we're getting to the actual problem you are trying to solve.
Some comments
1. Do you really need zero downtime, how about 1 second downtime ? 5
seconds, 10 seconds ?
2. If you really need zero downtime, then you can't achieve that with
a single process, so you're really talking about how to cleanly
shutdown one worker at a time for a rolling upgrade scenario.
3. You should research how products like nginx do process restarts,
they don't use socket tricks like this, they just pass the accepting
socket down to a child process.
So, some questions
1. what platform(s) are you targeting ?
2. what is your SLA ?
3. how are you currently managing your process at the moment, and how
quickly can it restart the process if it fails ?
Cheers
Dave