LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Which is best for implementing SMTP servers in unix.. fork or pthread ? (https://www.linuxquestions.org/questions/linux-newbie-8/which-is-best-for-implementing-smtp-servers-in-unix-fork-or-pthread-441800/)

vskgopu 05-05-2006 02:50 AM

Which is best for implementing SMTP servers in unix.. fork or pthread ?
 
Hi am kamesh from india..
Which is best for implementing SMTP servers in unix.. fork or pthread ?
Hi friends ..
I am implementing a smtp relay server for delaying the mails for a "x" minutes. I dont know which one to use fork or pthread..
plz help me. my mail id is vskgopu@gmail.com

visaris 05-05-2006 10:20 PM

For implementing? Well, it depends...

The fork() method is probably more portable and would probably provide more consistant results. fork() is also going to be slower if you plan on doing much IPC, though I don't see that as much of an issue with a SMTP relay..

I would think pthreads would be easier to write with, would end up faster, and should be portable enough. If this will run on a system with good pthread support (NPTL, etc) I would choose the pthread library over fork().

vskgopu 05-07-2006 09:40 PM

thanks friend


All times are GMT -5. The time now is 08:50 AM.