Re: Creating a file that self-destroys at each reboot
From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 04/08/04
- Next message: Luca T.: "Re: Creating a file that self-destroys at each reboot"
- Previous message: WTH: "Re: mouse vs. keyboard"
- In reply to: Martin Blume: "Re: Creating a file that self-destroys at each reboot"
- Next in thread: Luca T.: "Re: Creating a file that self-destroys at each reboot"
- Reply: Luca T.: "Re: Creating a file that self-destroys at each reboot"
- Reply: Martin Blume: "Re: Creating a file that self-destroys at each reboot"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 08 Apr 2004 21:33:45 +0200
Martin Blume wrote:
>
> - when the app starts that needs the file, it checks that
> the modification time of the file is later than the last
> boot time (this is somewhere in a /proc file expressed as
> seconds since epoch, but I just don't find it now).
It is in /proc/stat. However I think a more reliable
aproach would be to store the boot ID in the file.
Compare the boot ID in the file with the current
boot ID. If they are identical the file was created
after the last boot. The boot ID is in
/proc/sys/kernel/random/boot_id
-- Kasper Dupont -- der bruger for meget tid paa usenet. For sending spam use mailto:aaarep@daimi.au.dk /* Would you like fries with that? */
- Next message: Luca T.: "Re: Creating a file that self-destroys at each reboot"
- Previous message: WTH: "Re: mouse vs. keyboard"
- In reply to: Martin Blume: "Re: Creating a file that self-destroys at each reboot"
- Next in thread: Luca T.: "Re: Creating a file that self-destroys at each reboot"
- Reply: Luca T.: "Re: Creating a file that self-destroys at each reboot"
- Reply: Martin Blume: "Re: Creating a file that self-destroys at each reboot"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|