1

How do I make a new terminal window that is a child process of another one?

for example,

If I am in one terminal and I do export zzz=123 then a child process should have $zzz .

If I do cmd-n then I get a new terminal window but it is not a child of the previous one so it doesn't have $zzz

I'd like to be able to make a new terminal window that is a child of the previous one. How do I do that?

  • When you execute cmd-n you get a new terminal, but it is not a child terminal from the last one, it is just another terminal. Variables don't propagate across terminals, unless you add it to the ~/.bashrc. But I don't know if this is a good solution for you. – Prado Aug 9 at 17:05
  • @Prado adding to the bashrc / .bash_profile, is not a child process in a new window, neither is cmd-n. So are you suggesting that you you think there is no way to get a child process in a new terminal? – barlop Aug 9 at 17:06
  • A child process inside the same terminal window will be able to read the exported variable, example, if you export it, than execute 'bash' this new bash is a child of the other bash, if you then execute 'env' you will see the exported variable. But to put the child process in a new terminal window, I don't know if it is possible. – Prado Aug 9 at 17:10
  • Yes, I think there is no way to get a child on a new terminal window. – Prado Aug 9 at 17:11

You must log in to answer this question.

Browse other questions tagged .