4 ms·
Copyover MUD servers used to do all sorts of cool stuff. I remember seeing one that would reboot by: 1. Open a pipe 2. fork() 3. parent exec()'s the new bina
by endgame 6y ago
Copyover MUD servers used to do all sorts of cool stuff. I remember seeing one that would reboot by:
1. Open a pipe
2. fork()
3. parent exec()'s the new binary with an argument saying "reload yourself from pipe at FD #n"
4. child writes the entire game state including open connections down the pipe, and closes
It's done this way so the PID of the process doesn't change.