| delorie.com/archives/browse.cgi | search |
| 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 |
| Date: | Sat, 2 Dec 2000 22:06:50 -0500 |
| From: | Christopher Faylor <cgf AT redhat DOT com> |
| To: | cygwin AT cygwin DOT com |
| Cc: | schwarza AT gdls DOT com |
| Subject: | Re: newbie: Out of order execution in script |
| Message-ID: | <20001202220650.A19416@redhat.com> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com, schwarza AT gdls DOT com |
| References: | <OFE9D19C15 DOT E7A034F8-ON852569A4 DOT 00500A62 AT gdls DOT com> |
| Mime-Version: | 1.0 |
| User-Agent: | Mutt/1.3.11i |
| In-Reply-To: | <OFE9D19C15.E7A034F8-ON852569A4.00500A62@gdls.com>; from schwarza@gdls.com on Mon, Nov 27, 2000 at 09:34:44AM -0500 |
On Mon, Nov 27, 2000 at 09:34:44AM -0500, schwarza AT gdls DOT com wrote:
>
>---------------------- Forwarded by Arthur I Schwarz/LS/GDYN on 11/27/2000
>09:34 AM ---------------------------
>
>
>Randall R Schulz <rschulz AT teknowledge DOT com> 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"
>-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
How are you running this function? I've tried this many many times on many
different machines and I always get the desired effect. I've tried creating
a simple script with just that function and a "logon" and everything works
correctly. I've tried typing "logon" from bash and everything works.
Is this function part of a .profile? Do you just type 'logon' at the
bash command prompt?
Can you duplicate this problem under strace?
strace -b16384 -osomefile -f bash
If so, please send 'somefile' to this mailing list.
Thanks.
cgf
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |