Bird
0
0

Why might a Node.js child process exit with code null but provide a signal name instead?

hard📝 Conceptual Q10 of 15
Node.js - Child Processes
Why might a Node.js child process exit with code null but provide a signal name instead?
AThe process was terminated by an external signal like SIGTERM or SIGKILL
BThe process completed successfully with no errors
CThe process crashed due to a syntax error
DThe exit event was not emitted
Step-by-Step Solution
Solution:
  1. Step 1: Understand exit code and signal relationship

    If a process is terminated by a signal, it does not have a normal exit code, so code is null.
  2. Step 2: Recognize signal termination meaning

    The signal name indicates which external signal caused termination, e.g., SIGTERM or SIGKILL.
  3. Final Answer:

    The process was terminated by an external signal like SIGTERM or SIGKILL -> Option A
  4. Quick Check:

    Null exit code + signal means external termination [OK]
Quick Trick: Signal termination means exit code null, signal set [OK]
Common Mistakes:
  • Thinking null exit code means success
  • Confusing signal termination with crash
  • Assuming exit event not emitted

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes