do_jobctl_trap(9)
π
do_jobctl_trap β Kernel API Manual (section 9) π
πΈ NAME πΈ
do_jobctl_trap β take care of ptrace jobctl traps. That's the whole vibe, bestie: she's the one handling ptrace jobctl trap business. π
β¨ SYNOPSIS β¨
void do_jobctl_trap (void );
No cap, that's the signature. π
π ARGUMENTS π
voidβ no arguments. Literally none. Zero. The void is voiding. π«Ά
π DESCRIPTION π
okay so here's the tea. When PT_SEIZED is set, do_jobctl_trap is used for both group stop and explicit SEIZE/INTERRUPT traps. Both of those generate a PTRACE_EVENT_STOP trap with accompanying siginfo. If stopped, the lower eight bits of exit_code contain the stop signal; otherwise, it's SIGTRAP. Periodt. β¨
When !PT_SEIZED, it's used only for group stop trap, with the stop signal number as exit_code and no siginfo. That's it β no extra siginfo energy. π
π¦ CONTEXT π¦
Must be called with current->sighand->siglock held. The lock may be released and re-acquired before returning, with intervening sleep. So yeah, it can nap mid-call β iconic but true. π
π SEE ALSO π
Kernel file: ./kernel/signal.c β bestie, here's the whole friend group:
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_signal_stop(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)
xoxo, your kernel bestie π β source/version: ./kernel, dated October 2026, and this was the do_jobctl_trap(9) page. slay and stay signal-safe! π
π¦ 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