Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: cygwin AT cygwin DOT com X-Mailer: Lotus Notes Release 5.0.1a (Intl) 17 August 1999 Message-ID: From: schwarza AT gdls DOT com Date: Mon, 27 Nov 2000 09:34:44 -0500 MIME-Version: 1.0 X-MIMETrack: Serialize by Router on STL01/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at 11/27/2000 09:34:45 AM, Itemize by SMTP Server on STLHUB/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at 11/27/2000 09:34:45 AM, Serialize by Router on STLHUB/SRV/LS/GDYN(Release 5.0.5 |September 22, 2000) at 11/27/2000 09:34:46 AM Content-type: multipart/mixed; Boundary="0__=852569A400500A628f9e8a93df938690918c852569A400500A62" Content-Disposition: inline --0__=852569A400500A628f9e8a93df938690918c852569A400500A62 Content-type: text/plain; charset=us-ascii ---------------------- Forwarded by Arthur I Schwarz/LS/GDYN on 11/27/2000 09:34 AM --------------------------- Randall R Schulz on 11/22/2000 03:04:24 PM To: schwarza AT gdls DOT com, lhall AT rfk DOT com, cygwin AT cygwin DOT com cc: Subject: Re: newbie: Out of order execution in script Hi, I've got an analogous problem under Windows 2000 Pro SP1. The problem began occurring in previously working BASH function when I upgraded to Cygwin 1.1.5. It is still happening in 1.1.6. Here's the shell function definition whose "side-effects" on the file ".logon" occur out of order: logon() { if [ -n "$(jobs)" ]; then echo "There are stopped jobs." >&2 return 1 fi cd echo "#!/bin/sh" >|.logon cat .env-initial >>.logon echo "exec /bin/bash --login -i" >> .logon exec -lc .logon } After running this function the "exec /bin/bash --login -i" line is the second line in the file (the #! line comes first). Here are the first few lines of ".logon" after the logon function is executed: -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- #!/bin/sh exec /bin/bash --login -i ALLUSERSPROFILE="C:\\Documents and Settings\\All Users" APPDATA="C:\\Documents and Settings\\Randall R Schulz\\Application Data" CLASSPATH="C:\\WINNT\\System32\\QTJava.zip" COMMONPROGRAMFILES="C:\\Program Files\\Common Files" COMPUTERNAME="CLEMENS" COMSPEC="C:\\WINNT\\system32\\cmd.exe" -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- My mail server is spam-blocked (wrongly) so only Larry and Art are going to see this mail. I'd like to help resolve this. If you have anything you'd like me to do to help diagnose the underlying problem, let me know. I've attached a file containing "cygcheck -s -v" output. RandyS At 13:48 -0500 11/22/00, schwarza AT gdls DOT com wrote: >I have rechecked the results and do not believe that this is >a Win95 issue. > >The following modified code was executed (bash -x