Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (2015) Python for Beginners The Python Shell

ctrl-z does not exit things!

I'm not sure where the best place to provide feedback is, but CTRL-Z does not exit processes! That's highly misleading!

CTRL-Z suspends processes to the background, keeping them running forever. It's at best, harmless, but at worst, can cause all kinds of weirdness if you leave tons of processes around suspended. (Applies to Linux and OS X at least)

4 Answers

Hey, Ctrl+z stops a process and if you run top you can check that the process is not running, if you want to bring it to the foreground after you stop it, run 'fg' and then quit it normally

Zee Alexander you may as well run bg to see which jobs you have on the background or 'jobs' to see which ones are as well on the background.

I know that, I was proving that the process is still left lying around, which bg doesn't directly prove (since that depends on how backgrounding is implemented).

It is left lying around but, it wont affect anything as it is stopped. And EVEN if the process starts eating resources the kernel will kill it if it produces starvation.

Letting the kernel get to that point is bad... Don't use ctrl-z just to stop things! I'm kind of laughing at having to defend this point.

For starters I'm not saying Ctrl-z kills a process it stops it. Two different things. Second of all there is nothing wrong in stopping a process, you don't seem to understand what happens when a process is stopped.

I do understand how it works. I'm not saying you should never use CTRL-Z or that using CTRL-Z is bad, I'm saying that advising students they are equivalent in this video is bad.

I may be imprecise in my usage of "stop" but I do understand the difference between kill and stop.

Again, I'm simply saying that teaching students they are equivalent is bad.

In that we can agree !