Re: Sort-of Announce: Gnet, a network library



Mike Palczewski wrote:
> 
> > Ummm calling fork() to do a gethostbyname instead of rewwriting
> > gethostbyname to operate asynchronously is dirty and slow...
> >
> > And it is still worse if this is in a library and that this library
> > is used in some *big* program...
> >
> > Do you remember that fork() does a copy of the *entire* calling process ?
> > How can you think of doing such a thing that way ????
> 
> how about vfork.  This won't copy the entire process.  On linux vfork
> 
> and fork are one and the same but I'm sure on other platforms they are
> 
> not.  This way you aren't copying the entire process.

Well, on Linux, everything is loaded on demand, so it only copies the
bits of process it needs.  I think that's how BSD and SysV UNICES work
as well with vfork (), right?

Not that I know anything about BSD or SysV... ;-)

Sean Middleditch



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