do_signal_stop(9)
πΈ do_signal_stop β Kernel API Manual πΈ
okay bestie, buckle up, because we're diving into do_signal_stop(9) and honestly? it's giving "small function, huge job control responsibilities" π
β¨ NAME β¨
do_signal_stop β the one that handles group stop for SIGSTOP and all its stop-signal besties π
π SYNOPSIS π
bool do_signal_stop (int signr );
π¦ ARGUMENTS π¦
signrβ the signal that's out here causing the group stop, but only if this call is the one initiating it. main character energy fr fr π
π DESCRIPTION π
so here's the tea β β if JOBCTL_STOP_PENDING is not set yet, this function kicks off a whole new group stop using signr and joins in on it. starting the party and showing up to it, iconic behavior honestly β¨
if JOBCTL_STOP_PENDING is already set? then it just slides into the group stop that's already happening. no drama, no new party, just participating π«Ά
if it actually participated in a group stop (which, yes, means it slept π΄), then true comes back and siglock is released. freedom! ποΈ
but wait β if the task is being ptraced, this function does not handle the stop itself. nope, not its job. instead, JOBCTL_TRAP_STOP gets scheduled, false comes back, and siglock is left completely untouched, like it never even met you π the caller has to make sure INTERRUPT trap handling takes place afterwards. that's on you, bestie, don't forget π
π₯ CONTEXT π₯
must be called with current->sighand->siglock held β and heads up, that lock gets released on a true return. so like, know that going in π
β RETURN β
falseβ if the group stop is already cancelled, or a ptrace trap got scheduled. no stop for you π«trueβ if it participated in the group stop. slay, you slept π€
π SEE ALSO π
kernel file ./kernel/signal.c plus this entire friend group of functions, no cap:
task_set_jobctl_pending(9)task_clear_jobctl_trapping(9)task_clear_jobctl_pending(9)task_participate_group_stop(9)ptrace_trap_notify(9)force_sig_seccomp(9)do_notify_parent_cldstop(9)do_jobctl_trap(9)do_freezer_trap(9)signal_delivered(9)sys_restart_syscall(9)set_current_blocked(9)sys_rt_sigprocmask(9)sys_rt_sigpending(9)copy_siginfo_to_external32(9)do_sigtimedwait(9)sys_rt_sigtimedwait(9)sys_kill(9)sys_pidfd_send_signal(9)sys_tgkill(9)sys_tkill(9)sys_rt_sigqueueinfo(9)sys_sigpending(9)sys_sigprocmask(9)sys_rt_sigaction(9)sys_rt_sigsuspend(9)
and that's the whole vibe, bestie π§ this page lives in the ./kernel corner of the universe and it's stamped October 2026 β go forth and stop some signals, you've got this ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms