[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS: cvs.openbsd.org: src



CVSROOT:	/cvs
Module name:	src
Changes by:	art_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org	2002/07/12 07:31:20

Modified files:
	sys/sys        : systm.h 
	sys/kern       : kern_subr.c 
	sys/netinet    : in.c 

Log message:
- Add a flags argument to dohooks.
The flag can be either HOOK_REMOVE or HOOK_REMOVE|HOOK_FREE.
o HOOK_REMOVE removes the hook from the list before executing it.
o HOOK_FREE frees the hook after that.

- Let dostartuphooks use HOOK_REMOVE|HOOK_FREE so we can reclaim the memory.

- Let doshutdownhooks use HOOK_REMOVE so that when some shutdown hook
panics (they do that all the #_(_at_)_$%! time these days) we don't loop
for ever. Don't HOOK_FREE, it doesn't matter and I don't want to add
another possible panic condition for shutdown hooks.

- Actually free the pointer we're throwing away in hook_disestablish (I wonder
how much memory this has leaked over the years).



Visit your host, monkey.org