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 trialzeealexander
604 Pointsctrl-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
tomasvukasovic
24,022 PointsHey, 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
zeealexander
604 PointsI 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).
tomasvukasovic
24,022 PointsIt 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.
zeealexander
604 PointsLetting 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.
tomasvukasovic
24,022 PointsFor 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.
zeealexander
604 PointsI 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.
tomasvukasovic
24,022 PointsIn that we can agree !
zeealexander
604 Pointszeealexander
604 Pointshttp://showterm.io/7464d3f5858e3531ccee0
tomasvukasovic
24,022 Pointstomasvukasovic
24,022 PointsZee 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.