0
0
Linux CLIscripting~20 mins

kill and signal types in Linux CLI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Signal Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
What is the output of sending SIGTERM to a process?
You run the command kill -15 1234 to send a SIGTERM signal to process 1234. What is the expected behavior if the process handles SIGTERM properly?
AThe process terminates gracefully, cleaning up resources before exiting.
BThe process immediately stops without cleanup.
CThe process ignores the signal and continues running.
DThe system restarts the process automatically.
Attempts:
2 left
💡 Hint
SIGTERM is a polite request to terminate a process.
💻 Command Output
intermediate
2:00remaining
What happens when you send SIGKILL to a process?
You execute kill -9 5678 to send SIGKILL to process 5678. What is the immediate effect?
AThe process ignores the signal and continues running.
BThe process is immediately terminated by the kernel without cleanup.
CThe process receives a chance to save data before exiting.
DThe process restarts automatically after termination.
Attempts:
2 left
💡 Hint
SIGKILL cannot be caught or ignored.
📝 Syntax
advanced
2:00remaining
Which kill command syntax sends SIGUSR1 to process 4321?
Choose the correct command to send the SIGUSR1 signal to process ID 4321.
Akill -usr1 4321
Bkill -SIGUSR1 4321
Ckill -signal SIGUSR1 4321
Dkill -s SIGUSR1 4321
Attempts:
2 left
💡 Hint
Use the -s option to specify signal by name.
🔧 Debug
advanced
2:00remaining
Why does kill -15 without a PID fail?
You run kill -15 without specifying a process ID. What error or behavior occurs?
Akill reports 'usage error' because PID is missing.
Bkill sends SIGTERM to all processes owned by the user.
Ckill sends SIGTERM to the shell itself.
Dkill silently does nothing and exits with success.
Attempts:
2 left
💡 Hint
kill requires a PID argument to know which process to signal.
🧠 Conceptual
expert
3:00remaining
What signal number corresponds to SIGSTOP and what is its effect?
Identify the signal number for SIGSTOP and explain what happens to a process when it receives this signal.
ASignal 15; the process terminates gracefully.
BSignal 9; the process is terminated immediately.
CSignal 19; the process is paused and can be resumed later.
DSignal 1; the process ignores the signal.
Attempts:
2 left
💡 Hint
SIGSTOP pauses a process without terminating it.