Re: shutdown process

From: Randy.Dunlap
Date: Wed Sep 22 2004 - 15:54:44 EST


On Wed, 22 Sep 2004 08:51:26 +0100 (BST) manomugdha biswas wrote:

| Hi all,
| I have written a module and loaded into kernel by
| insmod. I want to let my module know when the system
| is shutdown. How to let my module know that the system
| is going to shutdown??


See sig. Answering for Linux 2.6.x, but it looks like almost
no changes here from 2.4 to 2.6:


Call notifier_chain_register(&reboot_notifier_list, &notif_block);
or
register_reboot_notifier(&notif_block);


--
~Randy
MOTD: Always include version info.
(Again. Sometimes I think ln -s /usr/src/linux/.config .signature)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/