got it. I was thinking of exec like it would create it's own process rather 
than replacing everything--thanks for clearing that one up.
On Jan 20, 2010, at 11:30 AM, Brett McCoy wrote:

> On Wed, Jan 20, 2010 at 1:02 PM, Tyler Littlefield <[email protected]> 
> wrote:
> 
> > what purpose does that serve though? the response didn't include exec, but 
> > forking and then execing doesn't make much sense when you can just exec. 
> > Maybe I'm missing something, but it seems like it'd take up extra resources 
> > for no reason.
> 
> The exec...() functions will replace the current process image with a
> new one... your original program will no longer be running and you
> can't return back to it. This is why you would fork first and then run
> exec so the child process is running as the new program while your
> original is still running also. system() actually does this behind the
> scenes, but you have no control over the child process.
> 
> -- Brett
> ----------------------------------------------------------
> "In the rhythm of music a secret is hidden;
> If I were to divulge it, it would overturn the world."
> -- Jelaleddin Rumi
> 



[Non-text portions of this message have been removed]



------------------------------------

To unsubscribe, send a blank message to 
<mailto:[email protected]>.Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/c-prog/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/c-prog/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to