Friday, May 3, 2024
26
rated 0 times [  26] [ 0]  / answers: 1 / hits: 4780  / 2 Years ago, tue, november 30, 2021, 8:08:44

I am running Ubuntu 14.04 (64 bit). When I first found out about the command xterm, I tried the command xterm xterm, and it started infinitely opening new xterm windows.

ctrl + C stops it immediately and closes all windows.



But I wanted to see how far it goes and let it run as long as it can. It ate up almost all the RAM and eventually got closed (I think by the system itself).



So just out of curiosity, why/how does this happen?


More From » command-line

 Answers
4

I (guess) this is because the first parameter you give to xterm is the shell to use - xterm bash (or xterm /bin/bash), xterm python etc.



So it runs xterm, tries to start xterm as a shell, which starts another xterm as that ones shell, then another, and another...



You can probably find a bit more on this by running man xterm


[#24400] Wednesday, December 1, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ligdesig

Total Points: 164
Total Questions: 106
Total Answers: 114

Location: Japan
Member since Sat, Jun 6, 2020
4 Years ago
;