jdk/test/com/sun/tools/attach/ApplicationSetup.sh
changeset 9259 f63768ad58c5
parent 5506 202f599c92aa
child 9275 1df1f7dfab7f
equal deleted inserted replaced
9258:b5a28d36265b 9259:f63768ad58c5
     1 #!/bin/sh
     1 #!/bin/sh
     2 
     2 
     3 #
     3 #
     4 # Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
     4 # Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6 #
     6 #
     7 # This code is free software; you can redistribute it and/or modify it
     7 # This code is free software; you can redistribute it and/or modify it
     8 # under the terms of the GNU General Public License version 2 only, as
     8 # under the terms of the GNU General Public License version 2 only, as
     9 # published by the Free Software Foundation.
     9 # published by the Free Software Foundation.
    38 OUTPUTFILE=${TESTCLASSES}/Application.out
    38 OUTPUTFILE=${TESTCLASSES}/Application.out
    39 rm -f ${OUTPUTFILE}
    39 rm -f ${OUTPUTFILE}
    40 
    40 
    41 startApplication() 
    41 startApplication() 
    42 {
    42 {
    43   ${JAVA} $1 $2 $3 -jar "${TESTCLASSES}"/Application.jar > ${OUTPUTFILE} &
    43   # put all output from the app into ${OUTPUTFILE}
       
    44   ${JAVA} $1 $2 $3 -jar "${TESTCLASSES}"/Application.jar > ${OUTPUTFILE} 2>&1 &
    44   pid="$!"
    45   pid="$!"
    45 
    46 
    46   # MKS creates an intermediate shell to launch ${JAVA} so
    47   # MKS creates an intermediate shell to launch ${JAVA} so
    47   # ${pid} is not the actual pid. We have put in a small sleep
    48   # ${pid} is not the actual pid. We have put in a small sleep
    48   # to give the intermediate shell process time to launch the
    49   # to give the intermediate shell process time to launch the