This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

change in behavior of bash (recent or not)?


I checked for previous discussions or announcements relating to this, did not find 
such (obviously, because I am writing).

Once again (as per other recent posts): I am using Cygwin on Win98 SE (sometimes). 
This msg pertains to this environment only, not to running on NT etc. Just to be 
precise. So, my Cygwin, now:

    Cygwin DLL version info:
        DLL version: 1.3.9
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 51
        Shared data: 3
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix:
        Build date: Mon Jan 21 12:48:41 EST 2002
        Shared id: cygwin1S3

my bash: bash 2.05a-2.

I just updated bash along with Cygwin etc day before yesterday. Several months 
(approx 4) had elapsed since I last updated this particular Cygwin installation. 
Therefore this change -- if there is one -- may have appeared "long" before now.

The observation:
I have a script that runs from the 'STARTUP' folder when I boot W98, so that as soon 
as I have entered my Windoze 'login' I make sure that bash is going to know who I am -
- no, readers are not expected to understand what i am saying, I stated the purpose 
of the script first instead of the mechanism. To be concise I want to skip 
irrelevancies. The germane detail is .. this script is a one-line bash command in a 
Windows batch file that reads thus:

X:\Cygwin\bin\bash -c "echo -n WINSET USERNAME=`/bin/whoami.exe` 

The file that is written ("_session_user.bat") is used later when I invoke an 
interactive bash login shell.

What is germane to my inquiry is the observation that when I booted Windows today my 
script ran as if I had invoked an interactive bash shell. The behavior had changed. I 
got Window resizing because i invoke Chuck Wilson's consize.exe from my 
'/etc/profile' file (which is executed -- if present -- anytime bash is invoked as an 
interactive shell, no?). This is how I was tipped off that the behavior had changed.

Before, the command to bash just executed cleanly and quickly and I was done (the DOS 
console window in which this stuff happens is visible for a few seconds and then 
gone). Now, unwanted stuff is unnecessarily happening, and I am curious why: is this 
expected behavior of bash given the invocation above (simply a flag '-c' followed by 
a command to execute)? Should it not (according to my expectations, which i am not 
saying are correct, but simply giving what is the basis of my inquiry): run as a non-
interactive shell?

To be sure i have updated my batch script with this invocation of bash:

D:\win98_Cygwin\bin\bash --noprofile --norc -c \
  "echo -n WINSET USERNAME=`/bin/whoami.exe` >/cdv/c/_session_user.bat"

(The line is not broken at "\" in my batch script of course: email limitations).

Running it seems to accomplish the desired control of bash's behavior.

     Soren Andersen

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]