On Tue, May 16, 2006 at 12:38:05AM +0200, Joerg Schilling wrote:
> Jonathan Adams <[EMAIL PROTECTED]> wrote:
> 
> > you might avoid *some* of the expense (since, as of Solaris 10, system()
> > uses vfork(), even on multi-threaded processes.  So the "duplicating
> > the address space just to tear it down at exec() time" cost is gone.
> 
> Isn't vfork() nowerdays only slightly more expensive on Solaris than fork()?

It depends on the size of the address space.  If you have a very large
address space, fork() has to process each and every segment to set up
the COW. vfork() just stops the parent process and uses the address
space directly.

> The main difference between fork and vfork is that fork uses copy on write
> for the data segment.
> 
> There is no longer a "copy address space content" as it has been before 1988.

Of course not.  That's not the overhead I'm talking about.

Getting back to the original poster's question, he needs to either:

        [v]fork() and exec() some program which understands terminal stuff, or
        link to libcurses, which understands terminal stuff.

Cheers,
- jonathan

-- 
Jonathan Adams, Solaris Kernel Development
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to