If you want the "C" program and the spawned shell script to
"interact" and communicate back and forth with each other,
then you'd have to use the "pipe()" system call to set up a
two-way interprocess-communication pipe in the "C" program,
then call "fork()" to spawn a new identical process
(including the IPC pipes), then finally "exec()" in the
child process to bring the image of the desired shell
running it's shell script in.  Of course, each port of "C"
has variations on those basic function call (i.e. "exec()"
can be "execv()", "execve()", "execle()", etc).

If you're just going to have the "C" program spawn the shell
script that will operate independently of its parent, you
can just call the "system()" library call and be done with
it...

Hope this helps...

-Tim


> The unix and C forums are pretty inactive. Hope its ok to
> ask this here.  
> Anyone know how to do this? 
> 
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.net -- 
> Author: <[EMAIL PROTECTED]
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- 858-538-5051
> http://www.fatcity.com San Diego, California        --
> Mailing list and web hosting services
> ----------------------------------------------------------
> ----------- To REMOVE yourself from this mailing list,
> send an E-Mail message to: [EMAIL PROTECTED] (note
> EXACT spelling of 'ListGuru') and in the message BODY,
> include a line containing: UNSUB ORACLE-L (or the name of
> mailing list you want to be removed from).  You may also
> send the HELP command for other information (like
> subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tim Gorman
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to