On Mon, Jun 11, 2012 at 4:03 PM, David Korn <[email protected]> wrote: > cc: [email protected] > Subject: Re: [ast-developers] libshell C API to begin subshell? > -------- >> >> Is there any public C API to begin a subshell? I'd like to create a >> subshell and run several commands through sh_run() and then let either >> end the subshell through a sh_run() executing exit() or by providing >> another C API call to end it. >> >> Irek > > Not directly, but after calling sh_init(), if you call > exitval = sh_trap("(command...)",0) > it should run command in a subshell.
That doesn't help in our case because sh_trap() requires that the whole command chain must be known and available before calling it. But we want to run multiple commands in a subshell and stay in that subshell between sh_run() calls. The number and arguments to sh_run() may vary depending on the results we get between the calls. Irek _______________________________________________ ast-developers mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-developers
