Why do you not like fork for situations like this? To me it seems like the perfect tool to create little child processes. Also although I hate to point out the obvious the 'server' I posted above has maybe five times less code, making it substanially easier to read and write.