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 Message-Id: <4.3.1.2.20001122150913.020f6e18@pop.ma.ultranet.com> X-Sender: lhall AT pop DOT ma DOT ultranet DOT com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Wed, 22 Nov 2000 15:12:59 -0500 To: Randall R Schulz , cygwin AT cygwin DOT com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: newbie: Out of order execution in script In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" I guess I'm confused as to why one should expect things exec'd to run in a certain sequence. Isn't that the point of execing? If you're going to start 2 processes yet expect one to do something before the other needs it, you need to make sure the processes synchronize themselves. Obviously, this synchronization is not happening here or in Art's example AFAICT. Why do you expect to see synchronization here? Larry At 03:04 PM 11/22/2000, Randall R Schulz wrote: >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