Linux-kernel mailing list archive 1999-22,: Re: How can Emacs get a unique ID per Linux reboot?

# Re: How can Emacs get a unique ID per Linux reboot?

Dan Revel (revel@cse.ogi.edu)
Tue, 1 Jun 1999 10:38:22 -0700 (PDT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Greg Franks: "Re: Linux is a MicroKernal? [was Re: is Linux obsolete?]"
- Previous message: Sam Roberts: "Re: NR_TASKS Cost"

On Tue, 1 Jun 1999 18:58:32 +0200, Andi Kleen wrote:
> On Tue, Jun 01, 1999 at 05:58:18PM +0200, Matthew Wilcox wrote:
> > On Tue, Jun 01, 1999 at 05:29:07PM +0200, Andi Kleen wrote:
> > > In muc.lists.linux-kernel, you wrote:
> > > On RedHat systems you could read /var/run/random-seed, the saved state from
> > > /dev/random on last reboot (with a sanity check that its mtime is <= /proc/uptime).
> > > It should be pretty unlikely that there are collisions because it is 512 bytes of
> > > random data. I don't know if other distributions have a similar mechanism.
> >
> > Debian has it too, but:
> > -rw------- 1 root root 512 May 12 04:10 /var/run/random-seed
> > so you can only read it if you're root.
>
> Oops, yes. I forgot that. On RH it is true too. Ok, then hpa's suggestion
> looks like the most appropiate.

I think that just observing the modification time on /var/run/random-seed
should do the trick. /var/run/random-seed is only written on shutdown and
re-written on start-up by the script /etc/rc.d/init.d/random.

Dan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Greg Franks: "Re: Linux is a MicroKernal? [was Re: is Linux obsolete?]"
- Previous message: Sam Roberts: "Re: NR_TASKS Cost"