delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/11/22/14:55:47

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Subject: Re: newbie: Out of order execution in script
To: lhall AT rfk DOT com, cygwin AT cygwin DOT com
X-Mailer: Lotus Notes Release 5.0.1a (Intl) 17 August 1999
Message-ID: <OF9D8082CB.EC2181DD-ON8525699F.006539D4@gdls.com>
From: schwarza AT gdls DOT com
Date: Wed, 22 Nov 2000 13:48:40 -0500
MIME-Version: 1.0
X-MIMETrack: Serialize by Router on STL01/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at
11/22/2000 01:48:40 PM,
Itemize by SMTP Server on STLHUB/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at
11/22/2000 01:48:40 PM,
Serialize by Router on STLHUB/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at
11/22/2000 01:48:42 PM,
Serialize complete at 11/22/2000 01:48:42 PM

I have rechecked the results and do not believe that this is
a Win95 issue.

The following modified code was executed (bash -x <script> 2>&1 | tee
<file>

    [0] Statements prior to execution of [1]

    [1] ${importScript} ${importMain} ${tmp}

    [2] if [ ! -e ${outImp}.imp ] ; then

    [3]     echo 'ERROR: Unable to find ' ${outImp}.imp

    [4]    exit

        fi

    [5] sed -e '/(/d'                             \
            -e 's@/kostabi@@'                     \
            -e 's@^@\ -aI/kostabi@'               \
            -e 's@/@\\@g'           ${outImp}.imp > ${gnatI}



It appears that:

   [1] Was forked.

   [2] Was immediately executed.

   [3] Was sequentially executed.

   [4] Was sequentially executed and the intermediate output for
       [1] was dumped.

   [5] Was not executed.

If I guessed correctly, the fork proceeded in parallel to the main
script execution. All output (echo) from the forked script was placed
into a temporary file. The 'echo' in the calling script generated an
out-of-order output. When the calling script 'exit' was executed, the
intermediate output stored for the called script was dumped. The trace
output is included below.

Am I looking at this the wrong way?


art
---------------------------------------------------------------------

[0] + echo 'Start processing ' device_control_main  ## executing called
script
[0]   Start processing  device_control_main
[0] + echo
/aaav/aaav/MPA/build/device_control/devices.ss/aaav_scm_mpa.rel/device_control_main.adb
[0] + /aaav/scripts/import.sh /tmp/386107.gnatmake/import.txt
/tmp/386107.gnatmake

###  at this time the called script seems to be executing

[2] + '[' '!' -e /tmp/386107.gnatmake/device_control_main.imp ']'
[3] + echo 'ERROR: Unable to find '
/tmp/386107.gnatmake/device_control_main.imp
[3] ERROR: Unable to find  /tmp/386107.gnatmake/device_control_main.imp
[4] + exit

[1] Main file:  device_control_main
[1] /aaav/aaav/MPA/build/device_control/devices.ss/aaav_scm_mpa.rel
[1] ... more output



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019