Clear traps during shutdown before unloading kernel plugins