I'm actually working on a network client right now that needs to share it's connected socket amongst multiple process which are temporary. I'm using pthreads and just made the socket fd a global and this works fine.
If you haven't used pthreads before, it is very very simple to substitute it for fork in this circumstance. You just make your process a function and launch it this way:
Code:
pthread_t mythread;
pthread_create(&mythread,NULL,myfunc,NULL);
pthread_detach(mythread);
At the end of myfunc() (which must be void *) you need:
Code:
pthread_exit(NULL);
You can pass myfunc initial data (via the last pointer in pthread_create), so you don't even need to use a global if that's an issue.
You could switch over to that sort of model quite easily I think, it would not require many changes, and it gives you some more interesting opportunities too...