[cs631apue] fork or create thread

Jan Schaumann jschauma at stevens.edu
Mon Nov 3 21:58:59 EST 2014


zding4 <zding4 at stevens.edu> wrote:

> For our server and hw3, when server accept(2) a connection.
> We can fork a new process to handle this connection,
> I think we can also create a new thread(pthread) to do the same job,  
> which one do you prefer?

You are free to do either.

Since in this class we're not covering threads and properly programming
multi-threaded applications can get tricky, I'd probably suggest to
simply fork a new unix process, though.

-Jan


More information about the cs631apue mailing list