Re: Creating a file that self-destroys at each reboot

From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 04/08/04


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? */


Relevant Pages

  • Re: Post-migration glitches, iBook G4 Panther -> MacBook Tiger
    ... running when it did boot). ... Contact app itself runs just fine). ... .plist files and restarting; no luck. ... of everything I need to do if I have to archive re-install the OS. ...
    (comp.sys.mac.apps)
  • Re: RE: New Error When I Start
    ... If I try to execute an app during that time, ... You can Start with selective/Clean Boot by opening the Run command and type ... When all else fails, HijackThis v1.99.1 ... forums for expert analysis, not here. ...
    (microsoft.public.windowsxp.general)
  • Re: RE: New Error When I Start
    ... If I try to execute an app during that time, ... You can Start with selective/Clean Boot by opening the Run command and type ... When all else fails, HijackThis v1.99.1 ... forums for expert analysis, not here. ...
    (microsoft.public.windowsxp.general)
  • RE: New Error When I Start
    ... If I try to execute an app during that time, ... You can Start with selective/Clean Boot by opening the Run command and type ... When all else fails, HijackThis v1.99.1 ... forums for expert analysis, not here. ...
    (microsoft.public.windowsxp.general)
  • Post-migration glitches, iBook G4 Panther -> MacBook Tiger
    ... Two days ago my iBook G4 running Panther died of some purely electronic ... running when it did boot). ... earlier Panther iBook had no problem seeing this printer over the same ... Contact app itself runs just fine). ...
    (comp.sys.mac.apps)