sniffer
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 2 Aug 2011 18:30:27 +0000 (20:30 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 2 Aug 2011 18:30:27 +0000 (20:30 +0200)
src/gdb-io [new file with mode: 0755]

diff --git a/src/gdb-io b/src/gdb-io
new file mode 100755 (executable)
index 0000000..10152a5
--- /dev/null
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+TMP=/tmp
+if [ -d $TMP/server ];then
+       TMP=$TMP/server
+fi
+DIR=$TMP/gdb.d
+mkdir -p $DIR
+i=0
+while true;do
+       FILE=$DIR/`printf %02d $i`
+       if ! test -f $FILE;then
+               break
+       fi
+       i=$[$i+1]
+done
+tee $FILE.in | "$0"-orig "$@" | tee $FILE.out