freezer_fork(9)
π freezer_fork(9) π
okay bestie, welcome to the <pink>freezer_fork</pink> page from the Kernel API Manual β yes we're in the kernel docs now, and honestly? we're slaying π§β¨
πΈ NAME πΈ
freezer_fork β the cgroup post-fork callback, aka the little function that shows up right after a task gets forked π«Ά
β¨ SYNOPSIS β¨
void freezer_fork (struct task_struct *task );
that's it, that's the whole signature β void, one argument, iconic behaviour π
π ARGUMENTS π
taskβ a task which has just been forked. literally brand-new, fresh out the fork, main character energy π
π¦ DESCRIPTION π¦
so task has just been created (congrats to it π) and it should conform to the current state of the cgroup_freezer it belongs to. like, it needs to match the vibe of its cgroup freezer, periodt.
now here's the spicy part πΆοΈ β this function may race against freezer_attach. and if we lose that race? honestly no big deal, we don't have to do anything π because freezer_attach will put task into the appropriate state itself. so losing here is lowkey a win, we just vibe and let freezer_attach handle it π«Ά
no cap, the race is real, but the outcome's fine either way β just know who's doing the actual state-setting π
π SEE ALSO π
Kernel file ./kernel/cgroup/legacy_freezer.c plus the whole freezer friend group:
freezer_css_online(9)freezer_css_offline(9)update_if_frozen(9)freezer_apply_state(9)freezer_change_state(9)
go read them, iykyk πβ¨
aaaaand that's the page!! π mwah π this one lives in ./kernel/cgroup and it's dated October 2026 β so mark your calendar bestie, future vibes only π₯ππ
π¦ 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