On Wed, Oct 29, 2008 at 11:26:13AM +0000, Darren J Moffat wrote:
> posix_spawn(3C) already allows specifying the uid/gid of the child using
> posix_spawn_file_actions_t.   I believe it should be possible for us to 
> add new actions to cover privilege sets, especially since there are 
> already two _NP (non portable) extensions defined in Solaris.

Yeah.  Also, I see that posix_spawn() uses vforkx() and exports _NP
flags that correspond to the new forkx/vforkx flags, so the precedent
exists.

In any case, the new function MUST make use of those forkx flags or
posix_spawn() equivs, and, actually, I'd say it MUST make use of
posix_spawn.

> The one case that this really helps with is the snprintf(buf, ...) ; 
> system(buf); where we have a single char* rather than a argv[][] style 
> array of arguments.

But arguably that case is trivial to convert to use a varargs/vectored
system() variant.

> I think it would be better to work on enhancing posix_spawn() and/or 
> providing a variant of it that took a char* rather than argv or varargs 
> style.  posix_spawn() is already very close to what you want anyway.

Yeah, posix_spawn() takes arg/env vectors, but it'd be cool to have a
varargs variant.

Nico
-- 

Reply via email to