diff options
author | Eric Blake <eblake@redhat.com> | 2011-12-01 13:58:28 -0700 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-12-01 13:58:28 -0700 |
commit | 6b93d00f5410ec183e3a70ebf8e418e3b1bb0191 (patch) | |
tree | 24388b328e9fe621689ea4fa4b66a4c9e08ed444 /build-aux/mktempd | |
parent | 8efe0514ce7c8185bf41184316cbd8da9be6c861 (diff) | |
download | gnulib-6b93d00f5410ec183e3a70ebf8e418e3b1bb0191.tar.gz |
mktempd: silence dd usage
When running a testsuite on FreeBSD, I saw a lot of:
1+ records in
0+1 records out
10 bytes transferred in 0.000063 secs (158875 bytes/sec)
literring the testsuite, and traced it to the fact that we
were silencing one, but not the other, dd usage in our fallback.
* build-aux/mktempd (rand_bytes): Silence dd.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'build-aux/mktempd')
-rwxr-xr-x | build-aux/mktempd | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/build-aux/mktempd b/build-aux/mktempd index 7a09a4b3bb..b6360e4746 100755 --- a/build-aux/mktempd +++ b/build-aux/mktempd @@ -44,7 +44,8 @@ rand_bytes() dev_rand=/dev/urandom if test -r "$dev_rand"; then # Note: 256-length($chars) == 194; 3 copies of $chars is 186 + 8 = 194. - dd ibs=$n count=1 if="$dev_rand" | tr -c $chars 01234567$chars$chars$chars + dd ibs=$n count=1 if="$dev_rand" 2>/dev/null \ + | tr -c $chars 01234567$chars$chars$chars return fi |