.bat from xterm opens cmd.exe window
Thu Jan 9 00:01:00 GMT 2003
On Wed, 8 Jan 2003, Alexander Gottwald wrote:
> On Wed, 8 Jan 2003, Igor Pechtchanski wrote:
> > > > echo sleep 10 > test.bat
> > > > ./test.bat
> I had not verified that. How, after Igor stated that cmd shows up in xterm I
> tried this too and it works for me. Even the snippet above displays in the
> xterm window.
FWIW, I'm getting the same behavior as reported by the original poster
(i.e., any cygwin program called from a batch file from an xterm pops up a
However, I believe I have an explanation of what's happening, though not a
Cygwin programs running in an xterm have a tty that does not have a
console window associated with it. When any cygwin program is invoked, it
checks (through a part of cygwin1.dll) whether it's running in a tty, and
if so, does not try to manipulate the console at all. However, when
cmd.exe is run in such a setting, it loses the tty information. Thus, a
program invoked from this cmd.exe session has neither a tty nor a console
window, so it has to allocate one. Hope this makes sense.
To the original poster: since there is no way to propagate tty information
through a cmd.exe session, I suppose the best solution would still be the
one Alexander proposed, i.e., live with it. Why would one want to call a
batch file from an xterm, anyway?
|\ _,,,---,,_ email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ firstname.lastname@example.org
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
More information about the Cygwin-xfree