Re: [PATCH 2/3] Use urandom to get random seed

2011-09-28 Thread Andi Kleen
> That depends upon the signal. If we got SIGCHLD or SIGWINCH, the call to read > probably > gets EINTR, but the signal is ignored unless explicitly handled. ignored signals do not cause EINTR no. And I don't think either gcc.c nor toplev.c can get SIGCHLD at this point. -Andi

Re: [PATCH 2/3] Use urandom to get random seed

2011-09-28 Thread Basile Starynkevitch
On Wed, 28 Sep 2011 16:56:32 +0200 Andi Kleen wrote: > > I suppose we might get interrupted before anything is read and > > read can return with -1 (I suppose partial reads are quite unlikely > > though)? Thus, don't we need the usual EINTR loop? > > When we get interrupted gcc will die. I don'

Re: [PATCH 2/3] Use urandom to get random seed

2011-09-28 Thread Andi Kleen
> I suppose we might get interrupted before anything is read and > read can return with -1 (I suppose partial reads are quite unlikely > though)? Thus, don't we need the usual EINTR loop? When we get interrupted gcc will die. I don't think gcc handles any asynchronous signals, right? -Andi --

Re: [PATCH 2/3] Use urandom to get random seed

2011-09-28 Thread Richard Guenther
On Wed, Sep 28, 2011 at 2:49 PM, Andi Kleen wrote: > From: Andi Kleen > > When available use /dev/urandom to get the random seem. This will lower the > probability > of collisions. > > On other systems it will fallback to the old methods. > > Passes bootstrap + testsuite on x86_64. Ok? > > gcc/:

[PATCH 2/3] Use urandom to get random seed

2011-09-28 Thread Andi Kleen
From: Andi Kleen When available use /dev/urandom to get the random seem. This will lower the probability of collisions. On other systems it will fallback to the old methods. Passes bootstrap + testsuite on x86_64. Ok? gcc/: * 2011-09-26 Andi Kleen * toplev.c (init_local_tick): Tr