do_freezer_trap(9)
π do_freezer_trap(9) β the Kernel API Manual, but make it make sense π§
Okay bestie, so we're in the Kernel API Manual today and the star of the show is do_freezer_trap. It's giving "tiny function, huge job" energy and honestly? Obsessed. Let's get into it π
β¨ NAME β¨
do_freezer_trap β the girl who handles the freezer jobctl trap π§β¨
π¦ SYNOPSIS π¦
void do_freezer_trap (void );
Like, that's the whole signature. Void in, void out. Clean. Minimalist. Main character energy fr fr π
π ARGUMENTS π
voidβ no arguments. Not a single one. She takes nothing and she gives nothing back πββοΈ
πΈ DESCRIPTION πΈ
So here's the tea β: do_freezer_trap puts the task into frozen state β but only if the task is not about to quit. Like, if it's already on its way out the door, she's not gonna bother, yk? π
In that case β the "about to quit" case β it drops JOBCTL_TRAP_FREEZE. That's it. That's the vibe check. β
π CONTEXT π
β οΈ Listen up, this part is not optional: this function must be called with current->sighand->siglock held.
And yes, that lock is always released before returning. Always always. No cap. So don't go thinking you still have it when you get back, because you don't ππ₯
π SEE ALSO π
Grab a snack bestie, this list is long β but every single one of these is iconic in her circle π:
- Kernel file
./kernel/signal.c 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_jobctl_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)
That's the whole page, bestie β go forth and trap some freezers π§π«Ά
Signed off from ./kernel, dated October 2026, and yeah β this was do_freezer_trap(9). Mwah πβ¨
π¦ 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