Source-Changes archive

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

NetBSD master CVS tree commits



cgd
Sat Nov 23 16:42:32 PST 1996
Update of /cvsroot/src/sys/kern
In directory netbsd1:/var/slash-tmp/cvs-serv27124

Modified Files:
        kern_subr.c 
Log Message:
fix two problems with shutdown hook code:
(1) after removing a shutdown hook (in shutdownhook_disestablish()),
    free it.  We created it, we have to free it.  Without this,
    shutdownhook_disestablish() leaks memory.
(2) in doshutdownhooks(), before running each hook, remove it from the
    shutdown hook list.  This makes sure that every hook is tried once
    (because doshutdownhooks() is called from before rebooting, and
    a fault in a shutdown hook will cause doshutdownhooks() to be called
    again), but prevents the hooks from potentially being run infinitely
    (as used to be possible, in the above-mentioned situation).




Home | Main Index | Thread Index | Old Index