do_jobctl_trap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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