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' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -