Message ID | 87bk3wj5rq.fsf@oldenburg.str.redhat.com |
---|---|
State | New |
Headers | show |
Series | malloc: Replace shell/Perl gate in mtrace | expand |
$ malloc/mtrace Can't locate malloc/mtrace in @INC (@INC contains: /usr/lib/perl5/site_perl/5.26.1/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.26.1 /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.26.1 /usr/lib/perl5/5.26.1/x86_64-linux-thread-multi /usr/lib/perl5/5.26.1 /usr/lib/perl5/site_perl) at -e line 1.
diff --git a/malloc/mtrace.pl b/malloc/mtrace.pl index dc6085820e..a6e2ca7589 100644 --- a/malloc/mtrace.pl +++ b/malloc/mtrace.pl @@ -1,6 +1,11 @@ #! /bin/sh -eval exec "perl -e 'shift; \$progname=shift; shift; require \$progname'" . "$0" . "$@" - if 0; +eval "q () { + : +}"; +q { + exec perl -e '$progname=shift; require $progname' "$0" "$@" +} +; # Copyright (C) 1997-2024 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Based on the mtrace.awk script.