in reply to Mangled Forks

It's no wonder it handled only ever one connection, because varaibles are not shared between forked processes.

If you want to do that, use threads instead of processes.

Are you sure you understood how fork works?