aboutsummaryrefslogtreecommitdiff
path: root/malloc/memprof.sh
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-10-08 17:16:17 +0000
committerUlrich Drepper <drepper@redhat.com>1999-10-08 17:16:17 +0000
commitb5c6276a6ea23cf92e30132b92cf14119235b257 (patch)
tree546237363815c2c2fd8e2516dd89169b91c5c1c9 /malloc/memprof.sh
parent9640bbe1c1fab7e1373e59160889b1fbc0bd000c (diff)
downloadglibc-b5c6276a6ea23cf92e30132b92cf14119235b257.tar
glibc-b5c6276a6ea23cf92e30132b92cf14119235b257.tar.gz
glibc-b5c6276a6ea23cf92e30132b92cf14119235b257.tar.bz2
glibc-b5c6276a6ea23cf92e30132b92cf14119235b257.zip
Update.
1999-10-08 Ulrich Drepper <drepper@cygnus.com> * nis/nss_nisplus/nisplus-parser.c (_nss_nisplus_parse_spent): Fix handling of empty entries. Patch by Thorsten Kukuk <kukuk@suse.de>. 1999-10-08 Andreas Schwab <schwab@suse.de> * debug/xtrace.sh: Fix quoting bugs. Implement --help and --version. 1999-10-08 Andreas Schwab <schwab@suse.de> * debug/pcprofiledump.c: Fix typos. 1999-10-07 Andreas Jaeger <aj@suse.de> * math/Makefile (tests): Added basic-tests. * math/basic-test.c: New file. Contains function basic_tests from libm-test. 1999-10-07 Andreas Schwab <schwab@suse.de> * malloc/memprof.sh: Fix quoting bugs. 1999-10-08 Ulrich Drepper <drepper@cygnus.com> * timezone/europe: Update from tzdata1999h.
Diffstat (limited to 'malloc/memprof.sh')
-rwxr-xr-xmalloc/memprof.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/malloc/memprof.sh b/malloc/memprof.sh
index d7d8750704..5fc011b7d9 100755
--- a/malloc/memprof.sh
+++ b/malloc/memprof.sh
@@ -201,6 +201,7 @@ fi
add_env="LD_PRELOAD=$memprofso"
# Generate data file name.
+datafile=
if test -n "$data"; then
datafile="$data"
elif test -n "$png"; then
@@ -229,21 +230,22 @@ if test -n "$notimer"; then
fi
# Execute the program itself.
-eval $add_env $*
+eval $add_env '"$@"'
result=$?
-# Generate the PNG data file is wanted and there is something to generate
+# Generate the PNG data file if wanted and there is something to generate
# it from.
-if test -n "$png" -a -s "$datafile"; then
+if test -n "$png" -a -n "$datafile" -a -s "$datafile"; then
# Append extension .png if it isn't already there.
- if test $png = ${png%*.png}; then
- png="$png.png"
- fi
- eval $memprofstat $memprofstat_args $datafile $png
+ case $png in
+ *.png) ;;
+ *) png="$png.png" ;;
+ esac
+ $memprofstat $memprofstat_args "$datafile" "$png"
fi
-if test -z "$data" -a -n $datafile; then
- rm -f $datafile
+if test -z "$data" -a -n "$datafile"; then
+ rm -f "$datafile"
fi
exit $result