Commit c3b473e4 authored by topjohnwu's avatar topjohnwu

Fix get_outfd in embedded mode

parent 7ed2c077
...@@ -23,10 +23,10 @@ BOOTSIGNER="/system/bin/dalvikvm -Xnodex2oat -Xnoimage-dex2oat -cp \$APK com.top ...@@ -23,10 +23,10 @@ BOOTSIGNER="/system/bin/dalvikvm -Xnodex2oat -Xnoimage-dex2oat -cp \$APK com.top
BOOTSIGNED=false BOOTSIGNED=false
get_outfd() { get_outfd() {
if [ -z $OUTFD ] || readlink /proc/self/fd/$OUTFD | grep -q /tmp; then if [ -z $OUTFD ] || readlink /proc/$$/fd/$OUTFD | grep -q /tmp; then
# We will have to manually find out OUTFD # We will have to manually find out OUTFD
for FD in `ls /proc/self/fd`; do for FD in `ls /proc/$$/fd`; do
if readlink /proc/self/fd/$FD | grep -q pipe; then if readlink /proc/$$/fd/$FD | grep -q pipe; then
if ps | grep -v grep | grep -q " 3 $FD "; then if ps | grep -v grep | grep -q " 3 $FD "; then
OUTFD=$FD OUTFD=$FD
break break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment