[EMAIL PROTECTED] (Enrique Zanardi)  wrote on 16.12.97 in <[EMAIL PROTECTED]>:

> On Mon, 15 Dec 1997, Nicolás Lichtmaier wrote:

> >  Uh? Why don't you just do...
> >
> > int p[2];
> > pipe(p);
> > if(!fork())
> > {
> >     dup2(p[1],2);
> >     exec...
> > }
> > /* now you can read the output from the p[0] file descriptor... */

> Memory penalty. As busybox and dinstall are linked together in this
> implementation, forking implies doubling the already big memory
> requirements. Perhaps we should implement a libbusybox.so ...

I don't think so. That's what virtual memory and copy-on-write are for. If  
you fork() your program, you should only actually duplicate pages that are  
written to by one of the sides (and the management stuff in the kernel, of  
course).

Now, if you exec(), then libs come in handy.


MfG Kai


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to