jdk/test/sun/tools/common/ApplicationSetup.sh
changeset 4663 dfea6ffdb0dc
parent 2 90ce3da70b43
child 5506 202f599c92aa
equal deleted inserted replaced
4662:49b8cbe45e6a 4663:dfea6ffdb0dc
    43   # ${pid} is not the actual pid. We have put in a small sleep
    43   # ${pid} is not the actual pid. We have put in a small sleep
    44   # to give the intermediate shell process time to launch the
    44   # to give the intermediate shell process time to launch the
    45   # "java" process.
    45   # "java" process.
    46   if [ "$OS" = "Windows" ]; then
    46   if [ "$OS" = "Windows" ]; then
    47     sleep 2
    47     sleep 2
    48     realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
    48     if [ "${isCygwin}" = "true" ] ; then
       
    49       realpid=`ps -p ${pid} | tail -1 | awk '{print $4;}'`
       
    50     else
       
    51       realpid=`ps -o pid,ppid,comm|grep ${pid}|grep "java"|cut -c1-6`
       
    52     fi
    49     pid=${realpid}
    53     pid=${realpid}
    50   fi
    54   fi
    51                                                                                                      
    55                                                                                                      
    52   echo "Waiting for Application to initialize..."
    56   echo "Waiting for Application to initialize..."
    53   attempts=0
    57   attempts=0