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

Development Tools Console Foundations Processes Pausing and Resuming

Dmitry Birin
Dmitry Birin
13,851 Points

What does the `jobs` program do? Not clear answer.

There is a question: "What does the jobs program do?" And the right answer is "Show a list of processes in your current session" instead of "Lists all paused processes on the system". Could anybody explain me why? Thank you in advance. P.S. Every time when I hit "Enter", the quiz behind the overlay with the window where I'm typing get it like attempt answer. I think it's not right.

1 Answer

It's the first answer instead of the second because jobs also show non-paused processing running in your session. So, for example, if you ran irb and wrote the script:

until false do puts 'hi'; sleep 5 end

... then pressed Ctrl-Z and typed bg, the process would continue printing 'hi' every 5 seconds and it would show up in the jobs list, even though it's not paused.

Plus, the second answer talks about listing all paused processes on the system, which isn't true since it's a session-specific command.

Dmitry Birin
Dmitry Birin
13,851 Points

Hey there! From the video I misunderstood, that "jobs" lists only paused processed. So, the question more about <i>"in session"/"on the system"</i> thing and the right answer is right) Thank you for the clarification!