diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-02-17 08:36:28 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-02-17 08:36:28 +0000 |
commit | 07fb518573f6595548f992646a2c65e9b9770268 (patch) | |
tree | 2adf3d592e11cc121562ee92431315a0dc4c8edc /malloc | |
parent | 93e66914461326e0ab3804e0e841d7ee022b5b0c (diff) | |
download | glibc-07fb518573f6595548f992646a2c65e9b9770268.zip glibc-07fb518573f6595548f992646a2c65e9b9770268.tar.gz glibc-07fb518573f6595548f992646a2c65e9b9770268.tar.bz2 |
[BZ #3348]
2007-02-17 Ulrich Drepper <drepper@redhat.com>
[BZ #3348]
* malloc/memusage.sh: Cleanups.
* debug/xtrace.sh: Quoting and trap changes.
* locale/iso-3166.def: Add Jersey, Guernsey, and Isle Of Man entries.
Diffstat (limited to 'malloc')
-rwxr-xr-x | malloc/memusage.sh | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/malloc/memusage.sh b/malloc/memusage.sh index 67af499..eace785 100755 --- a/malloc/memusage.sh +++ b/malloc/memusage.sh @@ -77,6 +77,15 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. exit 0 } +# These variables are local +buffer= +data= +memusagestat_args= +notimer= +png= +progname= +tracemmap= + # Process arguments. But stop as soon as the program name is found. while test $# -gt 0; do case "$1" in @@ -213,15 +222,8 @@ datafile= if test -n "$data"; then datafile="$data" elif test -n "$png"; then - datafile=$(mktemp ${TMPDIR:-/tmp}/memusage.XXXXXX 2> /dev/null) - if test $? -ne 0; then - # Lame, but if there is no `mktemp' program the user cannot expect more. - if test "$RANDOM" != "$RANDOM"; then - datafile=${TMPDIR:-/tmp}/memusage.$RANDOM - else - datafile=${TMPDIR:-/tmp}/memusage.$$ - fi - fi + datafile=$(mktemp -t memusage.XXXXXX) || exit + trap 'rm -f "$datafile"; exit 1' HUP INT QUIT TERM PIPE fi if test -n "$datafile"; then add_env="$add_env MEMUSAGE_OUTPUT=$datafile" |