From 63e60c613ba89505965f2958a3c75c3b507eeb74 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 1 Nov 2009 20:35:22 +0000 Subject: [PATCH] Does not work yet - must trap other calls too --- jpctb | 4 ++-- jwrap-script-jpctb | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/jpctb b/jpctb index b2aa721..c50b43b 100755 --- a/jpctb +++ b/jpctb @@ -7,10 +7,10 @@ END jpctb_base="$0" jpctb_base="${jpctb_base%/*}" -if [ $* -lt 2 ]; then usage >&2; exit 127; if +if [ $# -lt 2 ]; then usage >&2; exit 127; fi export JWRAP_EXTDIR="$1"; shift -export JWRAP_SCRIPT="$jpctb_base/jwrap-script-pctb" +export JWRAP_SCRIPT="$jpctb_base/jwrap-script-jpctb" if [ x"$LD_PRELOAD" != x ]; then LD_PRELOAD="$LD_PRELOAD:"; fi export LD_PRELOAD="${LD_PRELOAD}$jpctb_base/libjwrap.so.1.0" diff --git a/jwrap-script-jpctb b/jwrap-script-jpctb index f6fe699..117e720 100755 --- a/jwrap-script-jpctb +++ b/jwrap-script-jpctb @@ -1,6 +1,10 @@ #!/bin/bash set -e$JWRAP_SCRIPT_X +exec 4>&2 +exec 2>>/home/ian/u +date >&2 + unwire () { ldp="$LD_PRELOAD:" ldp2='' @@ -23,7 +27,7 @@ unwire () { unset JWRAP_SCRIPT } -echo ":$*" +true jwrap-script-pctb: "$@" path="$1"; shift arg0="$1"; shift @@ -53,4 +57,4 @@ if [ x"$lastarg" = x"com.threerings.yohoho.client.YoApp" ]; then unwire fi -exec -a "$arg0" /dev/jwrap/bypass "$path" "$@" +exec -a "$arg0" /dev/jwrap/bypass "$path" "$@" 2>&4 -- 2.30.2