.bat from xterm opens cmd.exe window

Igor Pechtchanski pechtcha@cs.nyu.edu
Wed Jan 8 21:12:00 GMT 2003

On Wed, 8 Jan 2003, Alexander Gottwald wrote:

> On Wed, 8 Jan 2003, McEligot, Sean  (contractor) wrote:
> > Lately, running batch files (and perhaps other programs) from xterm or rxvt
> > have been opening new cmd.exe windows. they used to output directly to the
> > xterm console. To recreate from xterm run:
> >
> > echo sleep 10 > test.bat
> > ./test.bat
> >
> > On my machine, a cmd.exe window pops up for 10 seconds then disappears.
> >
> > What I expect to happen is the xterm would run the batch file without
> > popping up a new window and any output would go  to the xterm.
> The only interpreter for batch files is cmd.exe. After being started, cmd
> check if it has console (the windows terminal window) attached and creates
> one if not.
> Xterm (or better the bash running in xterm) has no possibility to tell cm.exe
> to use the xterm window.
> Solution: live with it or use shell scripts.
> bye
>         ago

That's not quite what's happening.  Windows cmd.exe has no problem with
running within an xterm, as can be easily verified by typing cmd.exe at a
bash prompt.  However, once cmd.exe is running, any *cygwin* program
started from that cmd (e.g., bash) will pop up a new window.  ISTR some
discussion of this on the cygwin list, but don't remember whether there
was any resolution.
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,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!
  -- /usr/games/fortune

More information about the Cygwin-xfree mailing list