Bird
0
0

What will be the output of the following commands?

medium📝 Command Output Q4 of 15
Linux CLI - Process Management
What will be the output of the following commands?
sleep 50 &
kill -STOP $!
AThe sleep process restarts from the beginning
BThe sleep process is terminated immediately
CThe sleep process ignores the signal and continues running
DThe sleep process is paused and does not finish until resumed
Step-by-Step Solution
Solution:
  1. Step 1: Understand the commands

    sleep 50 & runs sleep in background; kill -STOP $! sends SIGSTOP to that process.
  2. Step 2: Effect of SIGSTOP on sleep

    SIGSTOP pauses the process, so sleep pauses and waits to be resumed.
  3. Final Answer:

    The sleep process is paused and does not finish until resumed -> Option D
  4. Quick Check:

    SIGSTOP pauses process = paused sleep [OK]
Quick Trick: SIGSTOP pauses process, no termination [OK]
Common Mistakes:
  • Assuming SIGSTOP kills process
  • Thinking sleep restarts
  • Believing signal is ignored

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes