This is the mail archive of the cygwin@cygwin.com 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]

Question about Cygwin process behaviour and bash interactive mode


If I launch a Windows command shell (cmd.exe) from, e.g. a Window shortcut,
and then run bash from that shell, bash starts interactive mode.
If I launch a Cygwin bash shell from, e.g. cygwin.bat, then run cmd from
that shell (I type cmd), a Windows command shell starts. If I then run bash
from that command shell, bash starts in non-interactive mode.

Can anyone explain this behaviour and why bash starts in interactive mode in
one case, and non-interactive mode in the other, even though both times it
is launched from cmd.exe?

Chris

---

Starting bash from cmd.exe running from shortcut:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\chris>bash
bash-2.05b$ somecommand
bash: somecommand: command not found

Starting bash from cmd.exe started from bash:

^^^ bash is running in interactive mode.

chris@AVACADO ~
$ cmd
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\cygwin\home\chris>bash
bash
somecommand
bash: line 1: somecommand: command not found

^^^^ bash is running in non-interactive mode


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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