2009/327 [system_noshell]

Garrett D'Amore gdamore at sun.com
Fri May 29 15:12:59 PDT 2009


Glenn Skinner wrote:
> I think it would be helpful to see a few worked examples that show how
> system_noshell() and its variants make things simpler than using
> posix_spawn().
>
>     Date: Fri, 29 May 2009 10:41:30 -0700
>     From: Sumanth Naropanth <Sumanth.Naropanth at sun.com>
>     Subject: Re: system_noshell [PSARC/2009/327 FastTrack timeout
> 	    06/05/2009]
>
>     ...
>
>     system_noshell("/bin/rm /tmp/tmpfile") is simpler than
>     posix_spawn(pid, "rm", NULL, NULL, argv, NULL) which also includes
>     populating an argv vector.
>
> The example given above is a start, but I'd like to see something more
> realistic.
>
>   
Yes.  In the case above, unlink("/tmp/tmpfile") would be better than 
either, and a lot more efficient! :-)

    - Garrett




More information about the opensolaris-arc mailing list