> While working on another bug I read
> http://blogs.sun.com/quenelle/entry/vfork_and_posix_spawn ,
> http://developers.sun.com/solaris/articles/subprocess/subprocess.html
> and the Solaris 11/B48 |vfork()| manual page (which says:
> -- snip --
> The vfork() function is deprecated. Its sole legitimate  use
> as  a  prelude  to  an immediate call to a function from the
> exec family can be achieved  safely  by  posix_spawn(3C)  or
> posix_spawnp(3C).
> -- snip --
> ) ...
> ... which raises the question whether ksh93 should (or could) use
> |posix_spawn()| instead of |vfork()| 

Yes. Whenever posix_spawn() is available, its use is preferable 
to fork() or vfork() followed by exec().

Note that you can dynamically determine if it's available and use 
it only when it is, see

http://developers.sun.com/solaris/articles/subprocess/subprocess.html#avail

-Greg

> (the current ksh93/libshell source can be found at
> http://polaris.blastwave.org/browser/on/branches/ksh93/gisburn/prototype003/usr/src/lib/libshell/).
> 
> Suggestions/ideas/rants/etc. welcome...
> 
> ----
> 
> Bye,
> Roland


Reply via email to