FreeBSD 4.11 manual page repository

FreeBSD is a free computer operating system based on BSD UNIX originally. Many IT companies, like DeployIS is using it to provide an up-to-date, stable operating system.

at_exit, rm_at_exit - ask that a function be run at exit

 

NAME

      at_exit, rm_at_exit - ask that a function be run at exit
 

SYNOPSIS

      #include <sys/types.h>
      #include <sys/systm.h>
 
      typedef void (exitlist_fn) (struct proc *);
 
      int
      at_exit(exitlist_fn func);
 
      int
      rm_at_exit(exitlist_fn func);
 

DESCRIPTION

      The at_exit facility allows a kernel module to ensure that it is notified
      at any process exit.  The function func is called with the a pointer to
      the exiting process’s proc structure.
 
      If the requirement for notification is removed, then the function
      rm_at_exit() must be called with the exact func argument as the corre‐
      sponding call to at_exit().
      The at_exit function returns an errno, 0 meaning success.  The
      rm_at_exit() function returns the number of items removed (should be 0 or
      1).
      _exit(2)
 

HISTORY

      The at_exit() function appeared in FreeBSD 2.2.
 

AUTHORS

      The function was written by Julian Elischer 〈julian@FreeBSD.org〉.
 

Sections

Based on BSD UNIX
FreeBSD is an advanced operating system for x86 compatible (including Pentium and Athlon), amd64 compatible (including Opteron, Athlon64, and EM64T), UltraSPARC, IA-64, PC-98 and ARM architectures. It is derived from BSD, the version of UNIX developed at the University of California, Berkeley. It is developed and maintained by a large team of individuals. Additional platforms are in various stages of development.