tcl - How do I run interactive shell such as "exec tclsh" from inside tclsh? -


is possible run interactive shell inside tclsh? it's easy run interactive shell such bash or tclsh inside bash, have not found way reverse.

if run "exec tclsh" or "exec bash" inside tclsh don't prompt until type "exit" , hit enter, or use "ctrl-c" kills parent tclsh.

i prefer not use external package, if @ possible.

provided don't want pass values (other exit code) back calling tcl code can pretty redirecting standard channels tcl doesn't capture them:

exec tclsh <@stdin >@stdout 2>@stderr 

this work pretty subprocess (i've tested vi) , tclsh magically in interactive mode if decides try running subprocess.

if want more complex that, need using expect there's long list of tricky gotchas otherwise.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -