[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: glut/freeglut and fork()



Steve Baker:
>  It seems to me that a more natural approach would be to have the server be
>  the main program, have it immediately start a client, then the client can
>  decide either to connect to the local server that started it - or to some
>  remote server off on the network.
[cut]
Of course it is, but while client is always started, server must be started 
only when hosting a game....
The cleaner solution would be to fork() before any initialization is done, and 
then keeping the server idle, or even use this idle thread just to fork() a 
server thread, or even exec() it.
Maybe fork()ing twice is the best solution.
Again, lot of testing awaits me....

Regards,
Francesco Orsenigo