DragonFly On-Line Manual Pages
AT_FORK(9) DragonFly Kernel Developer's Manual AT_FORK(9)
at_fork, rm_at_fork -- ask that a function be run at fork
(*forklist_fn)(struct proc *, struct proc *, int);
The at_fork facility allows a kernel module to ensure that it is notified
at any process fork. The function func is called with the a pointer to
the forking process's proc structure, a pointer to the child's process
structure and a flag word, as used in rfork(2) to indicate the type of
If the requirement for notification is removed, then the function
rm_at_fork() must be called with the exact func argument as the corre-
sponding call to at_fork().
at_fork() returns an errno, 0 meaning success. rm_at_fork() returns the
number of items removed (should be 0 or 1).
The at_fork() function appeared in FreeBSD 2.2.
The function was written by Julian Elischer <julian@FreeBSD.org>.
DragonFly 4.1 August 15, 1996 DragonFly 4.1